Update github actions

This commit is contained in:
tree 2023-02-24 08:57:55 +01:00
parent d845a8cdb3
commit 69a424bd08
1 changed files with 20 additions and 10 deletions

View File

@ -7,8 +7,8 @@ on:
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-22.04
build:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
@ -34,12 +34,22 @@ jobs:
- name: Add custom domain
run: 'touch build/CNAME && echo "explore.prgblockweek.com" >> build/CNAME'
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
path: 'build'
deploy:
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1