rizaldy.club/.github/workflows/deploy.yaml

41 lines
829 B
YAML
Raw Normal View History

2021-07-18 22:54:00 +07:00
name: Deploy to GitHub Pages
on:
push:
branches:
2023-05-29 07:44:08 +07:00
- v4-alpha
2021-07-18 22:54:00 +07:00
jobs:
deploy:
2023-05-29 07:44:08 +07:00
runs-on: ubuntu-22.04
permissions:
contents: write
2021-07-18 22:54:00 +07:00
steps:
2023-05-29 07:44:08 +07:00
- uses: actions/checkout@v3
2022-05-03 12:51:15 +07:00
with:
2023-05-29 07:44:08 +07:00
fetch-depth: 0
2021-07-18 22:54:00 +07:00
2023-05-29 07:44:08 +07:00
- name: Setup Node
uses: actions/setup-node@v3
2021-07-18 22:54:00 +07:00
with:
2023-05-29 07:44:08 +07:00
node-version: '18'
2021-07-18 22:54:00 +07:00
2023-05-29 07:44:08 +07:00
- name: Cache dependencies
uses: actions/cache@v3
2021-07-18 22:54:00 +07:00
with:
2023-05-29 07:44:08 +07:00
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
2021-07-18 22:54:00 +07:00
2023-05-29 07:44:08 +07:00
- run: npm ci
- name: Build Quartz
run: npx quartx build
2021-07-18 22:54:00 +07:00
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public