Last active
October 14, 2021 17:21
-
-
Save enyo/bc74be652874c9bbb4ce8caac9527bc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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