Merge pull request #6078 from menloresearch/ci/deprecate-jan-docs-new-release
ci: deprecate jan docs new release workflow in favor of jan-docs
This commit is contained in:
commit
06941b932d
63
.github/workflows/jan-docs-new-release.yaml
vendored
63
.github/workflows/jan-docs-new-release.yaml
vendored
@ -1,63 +0,0 @@
|
|||||||
name: Deploy Docs on new release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- published
|
|
||||||
- edited
|
|
||||||
- released
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
name: Deploy to CloudFlare Pages
|
|
||||||
env:
|
|
||||||
CLOUDFLARE_PROJECT_NAME: docs
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
deployments: write
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: dev
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install jq
|
|
||||||
uses: dcarbone/install-jq-action@v2.0.1
|
|
||||||
|
|
||||||
- name: Fill env vars
|
|
||||||
working-directory: docs
|
|
||||||
run: |
|
|
||||||
env_example_file=".env.example"
|
|
||||||
touch .env
|
|
||||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
|
||||||
if [[ "$line" == *"="* ]]; then
|
|
||||||
var_name=$(echo $line | cut -d '=' -f 1)
|
|
||||||
echo $var_name
|
|
||||||
var_value="$(jq -r --arg key "$var_name" '.[$key]' <<< "$SECRETS")"
|
|
||||||
echo "$var_name=$var_value" >> .env
|
|
||||||
fi
|
|
||||||
done < "$env_example_file"
|
|
||||||
env:
|
|
||||||
SECRETS: '${{ toJson(secrets) }}'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
working-directory: docs
|
|
||||||
run: yarn install
|
|
||||||
- name: Build website
|
|
||||||
working-directory: docs
|
|
||||||
run: export NODE_ENV=production && yarn build && cp _redirects out/_redirects && cp _headers out/_headers
|
|
||||||
|
|
||||||
- name: Publish to Cloudflare Pages Production
|
|
||||||
uses: cloudflare/pages-action@v1
|
|
||||||
with:
|
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
||||||
projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }}
|
|
||||||
directory: ./docs/out
|
|
||||||
branch: main
|
|
||||||
# Optional: Enable this if you want to have GitHub Deployments triggered
|
|
||||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
2
.github/workflows/jan-docs.yml
vendored
2
.github/workflows/jan-docs.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
deployments: write
|
deployments: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user