Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Dec 29, 2023
1 parent 958ef68 commit 0382c38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
- name: Build artifacts
run: ./scripts/ci/build-artifacts.sh
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on github
run: node ./scripts/azure/github-comment.js "[Preview Preparing...](https://github.com/ng-alain/delon/actions/runs/${{ github.run_id }})"
env:
ACCESS_REPO: ${{ secrets.ACCESS_REPO }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}
- name: Build site
run: yarn run site:build
- name: 'Deploy Site'
Expand All @@ -36,7 +37,7 @@ jobs:
npx surge --project ./src/dist/browser --domain $DEPLOY_DOMAIN
env:
ACCESS_REPO: $(ACCESS_REPO)
ACCESS_TOKEN: $(ACCESS_TOKEN)
ACCESS_TOKEN: $(GITHUB_TOKEN)
SURGE_LOGIN: $(SURGE_LOGIN)
SURGE_TOKEN: $(SURGE_TOKEN)
- name: 'Update comment on github'
Expand All @@ -45,13 +46,15 @@ jobs:
node ./scripts/azure/github-comment.js "[Preview is ready!]($DEPLOY_DOMAIN)"
env:
ACCESS_REPO: $(ACCESS_REPO)
ACCESS_TOKEN: $(ACCESS_TOKEN)
ACCESS_TOKEN: $(GITHUB_TOKEN)
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}
- name: 'When failed'
if: failure()
run: node ./scripts/azure/github-comment.js "[Preview Build Failed!](https://github.com/ng-alain/delon/actions/runs/${{ github.run_id }})"
env:
ACCESS_REPO: $(ACCESS_REPO)
ACCESS_TOKEN: $(ACCESS_TOKEN)
ACCESS_TOKEN: $(GITHUB_TOKEN)
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}

test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "Current commit author name: ${commitAuthorName}"
# exit 0
# fi

echo "ACCESS_TOKEN: ${ACCESS_TOKEN}.."
# echo "ACCESS_TOKEN: ${ACCESS_TOKEN}.."

if [ -z ${ACCESS_TOKEN} ]; then
echo "Error: No access token for GitHub could be found." \
Expand Down

0 comments on commit 0382c38

Please sign in to comment.