Deploying seyLu/life-in-weeks #6
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 | |
run-name: Deploying ${{ github.repository }} | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Perform deploy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
attestations: write | |
deployments: write | |
pages: write | |
strategy: | |
matrix: | |
node-version: ["lts/iron"] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@951b48540b429070694bc8abd82fd6901eb123ca # v2.5.0 | |
with: | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3.5.3 | |
- name: Set up Node ${{ matrix.node-version }} | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- name: Install Dependencies | |
run: npm i | |
- name: Build Script | |
run: npm run build | |
- name: Deploy to Github Pages | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
npx gh-pages -d dist -u "github-actions-bot <support+actions@github.com>" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |