Update readme #11
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 GitHub Pages | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [16] | |
os: [ubuntu-latest] | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build:github | |
- name: Deploy with gh-pages | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
npx gh-pages -u "github-actions-bot <[email protected]>" -m "Deploy $(git log '--format=format:%H' main -1)" -d ./gh-page | |
if: ${{ github.ref == 'refs/heads/main' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |