From 7006d3c96267a15da20762d8b5161549c353294d Mon Sep 17 00:00:00 2001 From: Kevin Mayfield Date: Fri, 10 Jan 2025 06:06:22 +0000 Subject: [PATCH] Create igPublish.yml --- .github/workflows/igPublish.yml | 88 +++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .github/workflows/igPublish.yml diff --git a/.github/workflows/igPublish.yml b/.github/workflows/igPublish.yml new file mode 100644 index 0000000..897db17 --- /dev/null +++ b/.github/workflows/igPublish.yml @@ -0,0 +1,88 @@ +name: SUSHI Publish + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 'current' + + - name: Install SUSHI + run: npm install -g fsh-sushi + + - name: Install Publisher + run: ./_updatePublisher.sh -y + + - name: Install Java + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt' + + - name: Install Ruby + run: sudo apt install ruby ruby-all-dev -y + + - name: Install Jekyll + run: sudo gem install jekyll jekyll-plantuml + + - name: Install Graphvix + run: sudo apt install graphviz + + - name: Build IG + run: ./_genonce.sh ${{ vars.VALIDATOR_OFFLINE }} + + - name: Download and unpack font-awesome + run: wget https://fontawesome.com/v4/assets/font-awesome-4.7.0.zip; unzip font-awesome-4.7.0.zip -d output + + - name: Publish IG Artefact + uses: actions/upload-artifact@v3 + with: + name: IG Archive + path: ./output/ + + - name: Prepare files for GitHub Pages + run: | + cp -r output _site; + chmod -c -R +rX "_site/" | while read line; do + echo "::warning title=Invalid file permissions automatically fixed::$line" + done + - name: Publish IG to GitHub Pages + uses: actions/upload-pages-artifact@v3 + + - name: Cache Node modules + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}--build-cache-npm-packages-${{ hashFiles('**/package-lock.json') }} + + # Deploy job (https://github.com/actions/deploy-pages) + deploy: + # Add a dependency to the build job + needs: build + # Only deploy on development branch + # if: github.ref == 'refs/heads/development' + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action