feat: add image to page #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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
pull-requests: read | |
jobs: | |
commitlint: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # fetch-depth is required | |
# This needs a generated dependency - doesn't add anything to this test | |
- run: rm tsconfig.json | |
- uses: wagoid/commitlint-github-action@v5 | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.20.0' | |
- name: Set up JS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- uses: pre-commit/[email protected] | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- commitlint | |
- pre-commit | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Build | |
run: | | |
npm run build | |
touch build/.nojekyll | |
- name: Upload Artifacts | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'build/' | |
deploy: | |
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 | |
id: deployment | |
uses: actions/deploy-pages@v1 |