Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflow permissions #39

Merged
merged 2 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 53 additions & 6 deletions .github/workflows/build-doc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: build-doc

name: Documentation
on:
pull_request:
push:
workflow_call:
branches: [master]

jobs:
build-doc:
build-doc-artifacts:
name: Build and Upload doc Artifacts
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -18,12 +19,13 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt-get install doxygen
shell: bash
run: sudo apt-get install doxygen
- name: Install Graphviz
run: sudo apt-get install graphviz
shell: bash
run: sudo apt-get install graphviz
- name: Create Build Environment
shell: bash
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}
- name: Configure CMake and compile
shell: bash
Expand All @@ -36,3 +38,48 @@ jobs:
with:
name: doc_${{matrix.schema}}
path: ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}/doc/html

build-gh-pages-artifact:
name: Build and Upload Artifact github-pages
needs: build-doc-artifacts
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
CIM_1: CGMES_2.4.13_18DEC2013
CIM_2: CGMES_2.4.15_16FEB2016
CIM_3: CGMES_2.4.15_27JAN2020
CIM_4: CGMES_3.0.0
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download
uses: actions/download-artifact@v4
- name: Copy
shell: bash
run: |
mkdir -p ./copy_files/docs
cp -r ./doc_${{env.CIM_1}} ./copy_files/docs/${{env.CIM_1}}
cp -r ./doc_${{env.CIM_2}} ./copy_files/docs/${{env.CIM_2}}
cp -r ./doc_${{env.CIM_3}} ./copy_files/docs/${{env.CIM_3}}
cp -r ./doc_${{env.CIM_4}} ./copy_files/docs/${{env.CIM_4}}
cp ./README.md ./copy_files/docs/README.md
- name: Upload Artifact github-pages
uses: actions/upload-pages-artifact@v3
with:
path: ./copy_files/docs

deploy-gh-pages:
name: Deploy github-pages
needs: build-gh-pages-artifact
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
33 changes: 0 additions & 33 deletions .github/workflows/build-gh-pages.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Release packages

on:
push:
tags:
- 'release/v*'

tags: ['release/v*']
jobs:
package:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,6 +33,8 @@ jobs:
release:
needs: package
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: GetArtifact
uses: actions/download-artifact@v4
Expand Down
Loading