-
Notifications
You must be signed in to change notification settings - Fork 26
90 lines (83 loc) · 2.64 KB
/
Copy pathnode.js.yml
File metadata and controls
90 lines (83 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Deploy to Cloudflare and GitHub Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: self-hosted
timeout-minutes: 4320
name: Build Project
env:
ENABLE_DOCUSAURUS_EXPERIMENTAL: 'true'
steps:
- uses: actions/checkout@v5
with:
# Self-hosted runner: keep node_modules, .docusaurus and the
# node_modules/.cache/rspack persistent cache between runs.
# The default (clean: true) runs `git clean -ffdx`, which deletes
# all git-ignored files and wipes the rspack/MDX build caches,
# forcing a cold ~2h rebuild every push. clean: false makes
# incremental builds reuse the cache (rspackPersistentCache +
# mdxCrossCompilerCache), so only changed docs are recompiled.
clean: false
- name: Install dependencies
run: npm install
- name: Build
run: npm run build_32g
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: build-artifact
path: build
retention-days: 1 # Keeps the artifact for 1 day
# deploy-cloudflare:
# runs-on: ubuntu-latest
# needs: build
# name: Deploy to Cloudflare
# steps:
# - uses: actions/checkout@v5
# - name: Download build artifact
# uses: actions/download-artifact@v7
# with:
# name: build-artifact
# path: build
# - name: Deploy to Cloudflare Pages
# uses: cloudflare/wrangler-action@v3
# with:
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# command: pages deploy build --project-name=cool-coding
deploy-github-pages:
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
needs: build
name: Deploy to GitHub Pages
steps:
- uses: actions/checkout@v5
- name: Download build artifact
uses: actions/download-artifact@v7
with:
name: build-artifact
path: build
- name: Deploy to GitHub Pages
uses: actions/upload-pages-artifact@v5
with:
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
# submit-url-seo:
# name: Submit URL to IndexNow
# runs-on: ubuntu-latest
# needs: [ build, deploy-github-pages ]
# steps:
# - uses: actions/checkout@v5
# - name: Install Dependencies
# run: pip install requests
# - name: Submit URL to IndexNow
# run: |
# bash submit_url.sh