Move postbuild from scripts to CI #4
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8.15.6 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Postbuild | |
run: echo 'academie-des-renards.dunstetter.fr' > ./dist/CNAME | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |