Update staging-to-pages.yml #8
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: Deploy staging to GitHub Pages | |
on: | |
push: | |
branches: | |
- staging | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: enable corepack | |
run: corepack enable | |
- name: Install Dependencies | |
run: yarn install | |
- name: Build | |
# run: yarn build | |
run: yarn staging | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-output | |
path: dist | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-output | |
path: dist | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |