Skip to content

Commit

Permalink
Merge pull request #247 from Crypto-TII/fix/generate-documentation-gi…
Browse files Browse the repository at this point in the history
…thub-action

Fix generate documentation Github action.
  • Loading branch information
peacker authored Jun 10, 2024
2 parents c52fda0 + 511a088 commit 93b0286
Showing 1 changed file with 6 additions and 34 deletions.
40 changes: 6 additions & 34 deletions .github/workflows/generate-and-submit-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,31 @@ on:
push:
branches:
- main

permissions: write-all
jobs:
generate-documentation:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'develop'
runs-on: ubuntu-latest
runs-on: self-hosted-k3s
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build
uses: docker/build-push-action@v4
id: built-image
with:
context: .
file: ./docker/Dockerfile
push: false
load: true
tags: claasp-lib
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Generate documentation
run: docker run --rm -v $PWD:/home/sage/tii-claasp claasp-lib make doc
run: make doc

- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.AUTHORIZATION_TOKEN }}
branch: 'main'
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "Update documentation"

- name: Update develop branch
uses: morbalint/git-merge-action@v1
with:
target: 'develop'
source: 'main'
token: ${{ secrets.AUTHORIZATION_TOKEN }}
strategy_options: 'ours'
token: ${{ secrets.WORKFLOW_TOKEN }}

0 comments on commit 93b0286

Please sign in to comment.