@@ -17,23 +17,53 @@ permissions:
17
17
contents : read # for actions/checkout to fetch code
18
18
19
19
jobs :
20
- staging-release :
21
- permissions :
22
- statuses : write
23
- if : ${{ github.event_name != 'push' && github.repository_owner == 'weaveworks' && !github.event.pull_request.head.repo.fork }}
20
+ # staging-release:
21
+ # permissions:
22
+ # statuses: write
23
+ # if: ${{ github.event_name != 'push' && github.repository_owner == 'weaveworks' && !github.event.pull_request.head.repo.fork }}
24
+ # runs-on: ubuntu-latest
25
+ # defaults:
26
+ # run:
27
+ # working-directory: website
28
+ # steps:
29
+ # - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
30
+ # - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
31
+ # with:
32
+ # node-version: "16.x"
33
+ # - name: Build docs
34
+ # env:
35
+ # # GA_KEY: "dummy"
36
+ # # ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
37
+ # NODE_OPTIONS: "--max-old-space-size=4096"
38
+ # GITHUB_HEAD_REF: ${{ github.head_ref }}
39
+ # run: |
40
+ # yarn install --frozen-lockfile
41
+ # yarn clear
42
+ # export DOC_BASE_URL="/$GITHUB_HEAD_REF/"
43
+ # export DOC_URL=https://staging.docs.gitops.weaveworks.org
44
+ # export STAGING_BUILD=true
45
+ # yarn build
46
+ # touch build/.nojekyll
47
+ #
48
+ # - name: Upload artifact
49
+ # uses: actions/upload-pages-artifact@v3
50
+ # with:
51
+ # name: github-pages
52
+ # path: website/build
53
+ # retention-days: 365
54
+
55
+ build :
56
+ # Specify runner + build & upload the static files as an artifact
24
57
runs-on : ubuntu-latest
25
- defaults :
26
- run :
27
- working-directory : website
28
58
steps :
29
59
- uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
30
60
- uses : actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
31
61
with :
32
62
node-version : " 16.x"
33
63
- name : Build docs
34
64
env :
35
- # GA_KEY: "dummy"
36
- # ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
65
+ # GA_KEY: "dummy"
66
+ # ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
37
67
NODE_OPTIONS : " --max-old-space-size=4096"
38
68
GITHUB_HEAD_REF : ${{ github.head_ref }}
39
69
run : |
@@ -43,13 +73,25 @@ jobs:
43
73
export DOC_URL=https://staging.docs.gitops.weaveworks.org
44
74
export STAGING_BUILD=true
45
75
yarn build
76
+ touch build/.nojekyll
46
77
47
- - name : Upload artifact
48
- uses : actions/upload-pages-artifact@v3
78
+ - name : Upload static files as artifact
79
+ id : deployment
80
+ uses : actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
49
81
with :
50
- name : github-pages
51
- path : website/build
52
- retention-days : 365
82
+ path : build_outputs_folder/
83
+
84
+ # Deployment job
85
+ deploy :
86
+ environment :
87
+ name : github-pages
88
+ url : ${{ steps.deployment.outputs.page_url }}
89
+ runs-on : ubuntu-latest
90
+ needs : build
91
+ steps :
92
+ - name : Deploy to GitHub Pages
93
+ id : deployment
94
+ uses : actions/deploy-pages@v4
53
95
54
96
prod-release :
55
97
if : github.event_name != 'pull_request'
0 commit comments