Improve deployment workflow

This commit is contained in:
Dennis Reimann
2021-06-19 17:31:49 +02:00
parent 8b76b1bc48
commit 44a1becc45

View File

@@ -31,16 +31,12 @@ jobs:
run: npm ci
- name: Build
run: npm run prod
- name: Predeploy
if: success() && github.ref == 'refs/heads/master'
run: |
# https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/
touch dist/.nojekyll
# https://help.github.com/en/articles/managing-a-custom-domain-for-your-github-pages-site
echo einundzwanzig.space > dist/CNAME
- name: Deploy
if: success() && github.ref == 'refs/heads/master'
uses: maxheld83/ghpages@v0.3.0
env:
BUILD_DIR: dist/
GH_PAT: ${{ secrets.GH_PAT }}
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: einundzwanzig.space
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'