ci: replace the gh-pages action from peaceiris' one to actions/deploy… #6
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
name: Publish gh-pages | |
on: | |
push: | |
branches: | |
- release | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Install + Prepare | |
run: yarn | |
- name: Upload Builds | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: dist | |
pages: | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: | |
- build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v2 |