Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Davis committed Jan 5, 2024
1 parent 96feaf4 commit c0ce19c
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build and deploy

on:
push:
branches: ["main"]

env:
NODE_VERSION: 20

jobs:
build:
name: build
runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install
- run: npm run build:production

deploy:
needs: build
name: deploy
runs-on: ubuntu-latest

permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# # Specify runner + deployment step
# runs-on: ubuntu-latest
steps:
# - name: Fix permissions
# run: |
# chmod -c -R +rX "_site/" | while read line; do
# echo "::warning title=Invalid file permissions automatically fixed::$line"
# done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

# steps:
# - uses: actions/checkout@v4

# - name: Deploy
# uses: JamesIves/github-pages-deploy-action@4.1.4
# with:
# branch: gh-pages
# folder: dist
# registry-url: 'https://registry.npmjs.org'
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}

0 comments on commit c0ce19c

Please sign in to comment.