File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed
Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker
2+ on :
3+ push :
4+ schedule :
5+ - cron : " 42 2 2 * *"
6+ workflow_dispatch :
7+
8+ jobs :
9+ buildDockerImage :
10+ name : Build Docker image
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+ with :
16+ submodules : recursive
17+ lfs : false
18+ - name : Create LFS file list
19+ run : git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id
20+ - name : LFS Cache
21+ uses : actions/cache@v4
22+ with :
23+ path : .git/lfs/objects
24+ key : ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
25+ restore-keys : |
26+ ${{ runner.os }}-lfs-
27+ - name : Git LFS Pull
28+ run : git lfs pull
29+ - name : Setup Hugo
30+ uses : peaceiris/actions-hugo@v2
31+ with :
32+ hugo-version : ' latest'
33+ extended : true
34+ - name : Build
35+ run : hugo --minify --noTimes=false
36+ - name : Set up Docker Buildx
37+ uses : docker/setup-buildx-action@v1
38+ - name : Login to GitHub Container Registry
39+ uses : docker/login-action@v1
40+ with :
41+ registry : ghcr.io
42+ username : ${{ github.actor }}
43+ password : ${{ secrets.GITHUB_TOKEN }}
44+ - name : Docker meta
45+ id : meta
46+ uses : docker/metadata-action@v3
47+ with :
48+ images : ghcr.io/wisvch/bapc-2025
49+ tags : type=sha, prefix={{date 'YYYYMMDD'}}-
50+ - name : Build and push Docker image
51+ uses : docker/build-push-action@v2
52+ with :
53+ context : .
54+ tags : ${{ steps.meta.outputs.tags }}
55+ labels : ${{ steps.meta.outputs.labels }}
56+ push : ${{ github.ref == 'refs/heads/main' }}
Original file line number Diff line number Diff line change 1+ FROM wisvch/nginx
2+ # Change the config file to serve index for urls
3+ USER root
4+ RUN sed -i -r '/404.html;/a\ error_page 404 /404.html;' /etc/nginx/conf.d/default.conf
5+ RUN sed -i -r '/^server \{ .*/a absolute_redirect off;' /etc/nginx/conf.d/default.conf
6+ USER 100
7+ COPY --link ./public /srv
You can’t perform that action at this time.
0 commit comments