aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-23 18:13:50 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-23 19:55:39 +0200
commit05adf8e1bc47a9422d7a19c339fbafb0c675a387 (patch)
tree6f1b6aac7300152aacc126e127db5f840a62ef8f /.github
parentbuild: separate refinery-cli Docker image (diff)
downloadrefinery-05adf8e1bc47a9422d7a19c339fbafb0c675a387.tar.gz
refinery-05adf8e1bc47a9422d7a19c339fbafb0c675a387.tar.zst
refinery-05adf8e1bc47a9422d7a19c339fbafb0c675a387.zip
build: automate GitHub pages deployment
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml56
1 files changed, 51 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c7d7b2e6..9511db6a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -80,12 +80,58 @@ jobs:
80 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} 80 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
81 run: | 81 run: |
82 ./gradlew sonar -Pci --info --stacktrace --max-workers 4 --no-daemon 82 ./gradlew sonar -Pci --info --stacktrace --max-workers 4 --no-daemon
83 - name: Upload site artifact
84 if: ${{ matrix.os == 'ubuntu-latest' }}
85 uses: actions/upload-artifact@v4
86 with:
87 name: site-zip
88 path: subprojects/docs/build/refinery-docs.zip
89 compression-level: 0
83 reuse-check: 90 reuse-check:
84 name: REUSE Compliance Check 91 name: REUSE Compliance Check
85 runs-on: ubuntu-latest 92 runs-on: ubuntu-latest
86 steps: 93 steps:
87 - uses: actions/checkout@v4 94 - uses: actions/checkout@v4
88 - name: REUSE Compliance Check 95 - name: REUSE Compliance Check
89 uses: fsfe/reuse-action@a46482ca367aef4454a87620aa37c2be4b2f8106 96 uses: fsfe/reuse-action@a46482ca367aef4454a87620aa37c2be4b2f8106
90 with: 97 with:
91 args: --include-meson-subprojects lint 98 args: --include-meson-subprojects lint
99 publish-site:
100 name: Publish to GitHub Pages
101 if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'graphs4value/refinery' }}
102 needs: build
103 runs-on: ubuntu-latest
104 steps:
105 - name: Download site artifact
106 uses: actions/download-artifact@v4
107 with:
108 name: site-zip
109 path: site-zip
110 - name: Import GPG key
111 id: import-gpg
112 uses: crazy-max/ghaction-import-gpg@ea88154188003ca5aeb616063b2d0dd6a9cf86e2
113 with:
114 gpg_private_key: ${{ secrets.PGP_KEY }}
115 fingerprint: ${{ secrets.PGP_FINGERPRINT }}
116 passphrase: ${{ secrets.PGP_PASSWORD }}
117 git_config_global: true
118 git_user_signingkey: true
119 git_commit_gpgsign: true
120 - name: Commit and push to graphs4value.github.io
121 env:
122 GH_PAGES_TOKEN: ${{ secrets.GH_PAGES_TOKEN }}
123 GITHUB_REPOSITORY: ${{ github.sha }}
124 GITHUB_SHA: ${{ github.sha }}
125 run: |
126 mkdir graphs4value.github.io
127 pushd graphs4value.github.io
128 git config --global init.defaultBranch main
129 git config --global user.name "Graphs4Value bot"
130 git config --global user.email "refinery@refinery.tools"
131 git init
132 git remote add origin "https://x-access-token:${GH_PAGES_TOKEN}@github.com/graphs4value/graphs4value.github.io.git"
133 unzip ../site-zip/refinery-docs.zip
134 git add .
135 git commit -S -m "Update from https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
136 git push --force origin main
137 popd