Skip to content

Commit dbed539

Browse files
committed
deploy site to fastly only using github actions
1 parent c9eadef commit dbed539

8 files changed

Lines changed: 31229 additions & 22340 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Build and Deploy docs.rockylinux.org
3+
4+
concurrency: production
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
workflow-dispatch:
11+
repository_dispatch:
12+
types: [remote_deploy]
13+
14+
jobs:
15+
build:
16+
name: build
17+
runs-on: ubuntu-latest
18+
container:
19+
image: quay.io/rockylinux/rockylinux:9
20+
environment: production
21+
steps:
22+
- name: Install deps
23+
run: dnf -y install python3-pip npm git-core
24+
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v4
26+
with:
27+
repository: rocky-linux/documentation
28+
path: docs
29+
- run: python3.9 -m pip install -r requirements.txt
30+
- name: Build Site
31+
run: npm run build
32+
- name: Archive build artifacts
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: build-minified
36+
path: |
37+
build/minified/site
38+
- name: Deploy
39+
env:
40+
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}
41+
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
42+
run: npm run deploy

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# docs.rockylinux.org
2+
3+
![Deployment:Production](https://github.com/rocky-linux/docs.rockylinux.org/actions/workflows/deploy.yml/badge.svg)

build-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MINIFY=$(command -v minify || echo "./compute-js/bin/minify")
2121
# minify everything
2222
test -d build/minified || $MINIFY -r --sync --preserve=all -o build/minified build/site
2323

24-
STRIP_NONENGLISH_LOCALES=${STRIP_LOCALES:-true}
24+
STRIP_NONENGLISH_LOCALES=false
2525
if ${STRIP_NONENGLISH_LOCALES}; then
2626
# remove locales from minified (Fastly) site
2727
for locale in $(yq -r '.plugins[] | select(type == "object" and has("i18n")) | .i18n.languages[].locale' < mkdocs.yml | grep -v 'en'); do

compute-js/fastly.toml

Lines changed: 31179 additions & 22331 deletions
Large diffs are not rendered by default.

compute-js/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "mkdocs serve",
88
"prebuild": "bash setup-deps.sh",
99
"build": "bash build-all.sh",
10-
"postbuild": "bash deploy.sh"
10+
"deploy": "bash deploy.sh"
1111
},
1212
"dependencies": {
1313
"pngquant": "^4.2.0"

setup-deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pip install -r requirements.txt
1616
# fi
1717

1818
test -d compute-js/bin || mkdir compute-js/bin
19-
test -x compute-js/bin/fastly || ( curl -L https://github.com/fastly/cli/releases/download/v10.8.3/fastly_v10.8.3_linux-amd64.tar.gz | tar -xzf /dev/stdin -C compute-js/bin/ )
19+
test -x compute-js/bin/fastly || ( curl -L https://github.com/fastly/cli/releases/download/v10.12.3/fastly_v10.12.3_linux-amd64.tar.gz | tar -xzf /dev/stdin -C compute-js/bin/ )
2020

2121
# mkdocs optimize plugin requires pngquant
2222
npm install pngquant

vercel.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)