Merge pull request #236 from IIIF/glenrobson-patch-2 #201
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a basic workflow to help you get started with Actions | |
| name: Deploy-live | |
| # Controls when the action will run. Triggers the workflow on push or pull request | |
| # events but only for the master branch | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| jobs: | |
| build-honkit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: '0' | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| - run: npm install -g honkit gitbook-plugin-include gitbook-plugin-toggle-chapters gitbook-plugin-git-author | |
| - name: Build HonKit books | |
| run: .github/bin/buildHonkit.sh | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-honkit | |
| path: build/ | |
| build-gitbook: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: '0' | |
| - uses: actions/setup-node@v1 | |
| - run: npm install -g gitbook-cli | |
| - name: Build GitBook books | |
| run: .github/bin/buildGitbook.sh | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-gitbook | |
| path: build/ | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [build-honkit, build-gitbook] | |
| environment: | |
| name: 'production' | |
| url: "https://training.iiif.io/index.html" | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: '0' | |
| - uses: actions/setup-node@v1 | |
| - run: npm install -g marked@v3.0.8 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: build-honkit | |
| path: build/ | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: build-gitbook | |
| path: build/ | |
| - name: Convert index | |
| run: .github/bin/createIndex.sh | |
| - name: Update lastmod | |
| run: .github/bin/updateLastMod.sh | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| role-to-assume: arn:aws:iam::420715881449:role/GithubIdentify | |
| aws-region: us-east-1 | |
| - name: Copy files to live | |
| run: | | |
| aws s3 sync build/ s3://training.iiif.io/ --acl 'public-read' |