forked from apache/apisix-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(deploy.yml): deploy to netlify (apache#1081)
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
Submodule actions-netlify
added at
c5879c
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ name: Test and Deploy Website | |
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
pull_request_target: | ||
branches: [master] | ||
schedule: | ||
# Run everyday at 9:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07) | ||
|
@@ -24,6 +24,9 @@ jobs: | |
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "14" | ||
|
@@ -64,7 +67,7 @@ jobs: | |
|
||
- name: Sync documents | ||
run: | | ||
yarn sync-doc && yarn generate-repos-info && git status | ||
yarn prepare-data && git status | ||
- name: Apply docusaurus cache | ||
id: docusaurus-cache | ||
|
@@ -84,6 +87,20 @@ jobs: | |
run: | | ||
yarn update-sitemap && git status | ||
- name: Deploy to Netlify | ||
uses: ./.github/actions/actions-netlify | ||
with: | ||
publish-dir: "./website/build" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: "${{ github.event.pull_request.title }}, Deploy from GitHub Actions" | ||
enable-pull-request-comment: true | ||
enable-commit-comment: true | ||
overwrites-pull-request-comment: true | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 10 | ||
|
||
- name: Deploy | ||
uses: peaceiris/[email protected] | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'schedule' | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule ".github/actions/actions-netlify"] | ||
path = .github/actions/actions-netlify | ||
url = https://github.com/nwtgck/actions-netlify.git |