Skip to content

Instantly share code, notes, and snippets.

@enyo
Last active Oct 14, 2021
Embed
What would you like to do?
jobs:
build:
# ...
test:
# ...
deploy:
# Only run if merged to main.
if: github.ref == 'refs/heads/main'
# Only deploy if all tests passed.
needs: [build, test]
runs-on: ubuntu-latest
steps:
# No need to checkout the project, since all we need is to download the
# build artifact from the build step.
- uses: actions/download-artifact@v2
with:
name: build
path: build
# This seems to be the simplest way to publish to a separate branch.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./build
# Optional. This will create a CNAME file so GitHub Pages serves it
# under this domain.
cname: www.dropzone.de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment