Skip to content

Commit

Permalink
Add env variable into a build process
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikniebur committed Sep 12, 2023
1 parent cfccd5c commit 4c8f659
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions .github/workflows/deploy-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,42 @@ name: Build the page

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: write
pages: write
id-token: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 19

- name: Build
run: |
echo "Using Base path: $BASE_PATH"
npm install
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./dist

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 19

- name: Build
run: |
echo "Using Base path: $BASE_PATH"
npm install
npm run build
env:
BASE_PATH: ${{vars.BASE_PATH}}

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./dist

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

0 comments on commit 4c8f659

Please sign in to comment.