Skip to content

Commit ac23c46

Browse files
authored
Merge pull request #74 from rocky-linux/07-31-enable_production_deployments
enable production deployments
2 parents c03712a + 4025c5b commit ac23c46

6 files changed

Lines changed: 18801 additions & 18736 deletions

File tree

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export FASTLY_SERVICE_ID="lACFUzQjUGLnZsvoHgcnx6"
1+
export FASTLY_SERVICE_ID="HYHaTvqvKYYT1mYaL9qoc4"
22
export PATH="$PATH:$PWD/compute-js/bin"
33

44
[[ -f .envrc.local ]] && source .envrc.local

.github/actions/build-and-cache/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
run: echo "DOCS_SHA=$(git rev-parse --verify HEAD)" >> "$GITHUB_OUTPUT"
2525
shell: bash
2626

27-
- uses: actions/cache/restore@v4
27+
- uses: actions/cache@v4
2828
id: docs-cache
2929
with:
3030
path: build/site/minified
@@ -47,7 +47,7 @@ runs:
4747
- name: Save built site
4848
if: steps.docs-cache.outputs.cache-hit != 'true'
4949
id: cache-build
50-
uses: actions/cache/save@v4
50+
uses: actions/cache@v4
5151
with:
5252
path: |
5353
build/minified/site

.github/workflows/deploy.yml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
image: quay.io/rockylinux/rockylinux:9
2020
options: --user root
2121
outputs:
22-
DOCS_SHA: ${{steps.build.outputs.DOCS_SHA}}
22+
DOCS_SHA: ${{steps.docs-sha.outputs.DOCS_SHA}}
2323
environment: production
2424
steps:
2525
- name: Checkout mkdocs config
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: set docs-sha
3232
id: docs-sha
33-
run: echo "$DOCS_SHA" >> "$GITHUB_OUTPUT"
33+
run: echo "DOCS_SHA=$DOCS_SHA" >> "$GITHUB_OUTPUT"
3434
deploy:
3535
name: deploy
3636
needs: build
@@ -40,7 +40,13 @@ jobs:
4040

4141
- uses: actions/checkout@v4
4242

43-
- uses: actions/cache/restore@v4
43+
# - uses: actions/setup-node@v4
44+
- uses: action/setup-node@v4
45+
with:
46+
node-version: 20
47+
48+
# needs node
49+
- uses: actions/cache@v4
4450
id: docs-cache
4551
with:
4652
path: build/site/minified
@@ -49,7 +55,6 @@ jobs:
4955
enableCrossOsArchive: true
5056

5157
- name: Retrieve build artifacts
52-
if: steps.docs-cache.outputs.cache-hit != 'true'
5358
uses: actions/download-artifact@v4
5459
with:
5560
name: build-minified
@@ -66,14 +71,38 @@ jobs:
6671
run: npm install
6772
working-directory: ./compute-js
6873

74+
- name: restore cached fastly compute package
75+
id: restore-fastly-cache
76+
uses: actions/cache@v4
77+
with:
78+
path: |
79+
pkg/*.tar.gz
80+
key: cache-fastly-${{ steps.docs-sha.outputs.DOCS_SHA }}
81+
6982
- name: Build Compute Package
83+
if: steps.restore-fastly-cache.outputs.cache-hit != 'true'
7084
uses: fastly/compute-actions/build@v6
7185
with:
72-
verbose: true
86+
verbose: false
7387
project_directory: compute-js
7488
env:
7589
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}
7690

91+
- name: Upload fastly compute package
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: build-fastly-wasm
95+
path: |
96+
pkg/*.tar.gz
97+
98+
- name: cache fastly compute package
99+
id: cache-fastly
100+
uses: actions/cache@v4
101+
with:
102+
path: |
103+
pkg/*.tar.gz
104+
key: cache-fastly-${{ steps.docs-sha.outputs.DOCS_SHA }}
105+
77106
- name: Deploy Compute Package
78107
uses: fastly/compute-actions/deploy@v6
79108
with:

.github/workflows/preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: set docs-sha
3131
id: docs-sha
32-
run: echo "$DOCS_SHA" >> "$GITHUB_OUTPUT"
32+
run: echo "DOCS_SHA=$DOCS_SHA" >> "$GITHUB_OUTPUT"
3333

3434
preview:
3535
name: preview

0 commit comments

Comments
 (0)