Skip to content

Commit

Permalink
Automate github pages workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
h4de5 committed Apr 5, 2020
1 parent fbc0279 commit 42bae82
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/godot-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
unzip -oqq "${GITHUB_WORKSPACE}/assets.zip"
rm -f "${GITHUB_WORKSPACE}/assets.zip"
- name: export game
- name: Export Godot game
# Use version 1.2.0 (see releases for all versions)
uses: firebelley/[email protected]
with:
Expand All @@ -45,6 +45,30 @@ jobs:
godot_template_version: 3.2.1.stable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# checkout gh-pages branch in a different directory
- name: Setup github pages
uses: actions/checkout@v2
with:
path: github_pages
ref: gh-pages

# copy generated web export (2nd export preset)
- name: Copy web export
run: |
cp -f /home/runner/.local/share/godot/builds/2/* ${GITHUB_WORKSPACE}/github_pages
ls -lha ${GITHUB_WORKSPACE}
ls -lha ${GITHUB_WORKSPACE}/github_pages
# deploy directory to github pages
- name: Deploy github pages
if: success()
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: github_pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# deploy to github pages
# - name: Deploy to github pages
# run: |
Expand Down

0 comments on commit 42bae82

Please sign in to comment.