2022-09-08 08:40:58 +02:00
|
|
|
---
|
2021-07-24 03:12:35 +02:00
|
|
|
name: GitHub Pages
|
|
|
|
|
2022-04-28 05:45:48 +02:00
|
|
|
"on":
|
2021-07-24 03:12:35 +02:00
|
|
|
push:
|
|
|
|
|
2022-11-13 23:57:05 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2021-07-24 03:12:35 +02:00
|
|
|
jobs:
|
2023-04-18 13:35:40 +02:00
|
|
|
generate_tags:
|
2021-07-24 03:12:35 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-04-18 13:35:40 +02:00
|
|
|
outputs:
|
|
|
|
tags: ${{ steps.tags.outputs.tags}}
|
|
|
|
latest: ${{ steps.previoustag.outputs.tag }}
|
2021-07-24 03:12:35 +02:00
|
|
|
steps:
|
2023-04-18 13:35:40 +02:00
|
|
|
- id: tags
|
|
|
|
name: pull tags
|
|
|
|
uses: oraad/get-tags-action@v1.0.0
|
|
|
|
with:
|
|
|
|
repo: ${{ github.repository }}
|
|
|
|
limit: 100
|
2022-04-28 05:45:48 +02:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-04-18 13:35:40 +02:00
|
|
|
- name: 'Get Previous tag'
|
|
|
|
id: previoustag
|
|
|
|
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
2022-12-26 23:52:03 +01:00
|
|
|
with:
|
2023-04-18 13:35:40 +02:00
|
|
|
prefix: v1
|
|
|
|
fanout:
|
|
|
|
uses: './.github/workflows/kanidm_individual_book.yml'
|
|
|
|
needs: generate_tags
|
2022-12-26 23:52:03 +01:00
|
|
|
|
2023-04-18 13:35:40 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
# tag: ${{ fromJson(needs.generate_tags.outputs.tags) }}
|
|
|
|
tag:
|
2023-04-25 14:36:17 +02:00
|
|
|
- ${{ needs.generate_tags.outputs.latest}}
|
2023-04-18 13:35:40 +02:00
|
|
|
with:
|
|
|
|
tag: ${{ matrix.tag }}
|
|
|
|
parent_id: ${{ github.ref }}
|
|
|
|
docs_master:
|
|
|
|
uses: './.github/workflows/kanidm_individual_book.yml'
|
|
|
|
with:
|
|
|
|
tag: "master"
|
|
|
|
parent_id: ${{ github.ref }}
|
2022-12-26 23:52:03 +01:00
|
|
|
|
2023-04-18 13:35:40 +02:00
|
|
|
deploy:
|
|
|
|
needs:
|
|
|
|
- fanout
|
|
|
|
- docs_master
|
|
|
|
- generate_tags
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Download previously built docs
|
|
|
|
uses: actions/download-artifact@v3
|
2021-07-24 03:12:35 +02:00
|
|
|
with:
|
2023-04-18 13:35:40 +02:00
|
|
|
name: docs
|
2021-07-24 03:12:35 +02:00
|
|
|
|
2023-04-18 13:35:40 +02:00
|
|
|
- name: Extract the files
|
2023-04-25 14:36:17 +02:00
|
|
|
run: |
|
2023-04-18 13:35:40 +02:00
|
|
|
find . -name '*.tar.gz' -exec tar zxf "{}" \;
|
|
|
|
ls -la docs/
|
2023-04-25 14:36:17 +02:00
|
|
|
cd docs && \
|
|
|
|
ln -s ${{ needs.generate_tags.outputs.latest}}/ stable && \
|
|
|
|
cd ..
|
2023-04-18 13:35:40 +02:00
|
|
|
ls -la docs/
|