-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from gosling-lang/etowahadams/fix-deploy
fix: deploy workflow
- Loading branch information
Showing
1 changed file
with
26 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,38 @@ name: Deploy Examples | |
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
branches: ["master"] | ||
|
||
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
environment: | ||
name: github-pages | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
node-version: 18 | ||
- run: yarn install | ||
- name: Deploy | ||
run: | | ||
git config --global user.name "[email protected]" | ||
git config --global user.email "GitHub Action" | ||
git remote set-url origin https://${ACCESS_TOKEN}@github.com/${REPO}.git | ||
yarn deploy | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
REPO: ${{ github.repository }} | ||
- run: yarn build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
# Upload dist repository | ||
path: "./build" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |