Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Attempt to fix CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
aabounegm committed Nov 19, 2020
1 parent 50af3b9 commit 02bd72d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/pr_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,23 @@ jobs:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}

- name: Extract PR number
run: echo "PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')" >> $GITHUB_ENV

- uses: actions/setup-node@v1
- name: Install and Build
run: |
yarn install
SAPPER_APP_BASEPATH=attractions/${{ env.PR_NUMBER }} yarn export --basepath attractions/${{ env.PR_NUMBER }}
SAPPER_APP_BASEPATH=attractions/${{ github.event.number }} yarn export --basepath attractions/${{ github.event.number }}
- name: Deploy demo to GitHub Pages
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/__sapper__/export/attractions/${{ env.PR_NUMBER }}
destination_dir: ${{ env.PR_NUMBER }}
publish_dir: docs/__sapper__/export/attractions/${{ github.event.number }}
destination_dir: ${{ github.event.number }}
keep_files: true

- name: Post docs URL on PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Docs available on https://illright.github.io/attractions/${{ env.PR_NUMBER }}/"
msg: "Docs available on https://illright.github.io/attractions/${{ github.event.number }}/"

0 comments on commit 02bd72d

Please sign in to comment.