ANPL-1643 doc improvements for migration related parts #124
Workflow file for this run
This file contains 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
--- | |
name: Publish to Github Pages | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
permissions: read-all | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
container: | |
image: ministryofjustice/tech-docs-github-pages-publisher:data-platform | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- name: Compile Markdown to HTML | |
id: compile | |
# Using script content without htmlproofer | |
# run: /scripts/deploy.sh | |
run: | | |
cp /stashed-files/* . | |
# Compile source markdown files into HTML in the `/docs` directory | |
bundle exec middleman build --build-dir docs --relative-links --verbose | |
touch docs/.nojekyll | |
tar --dereference --directory docs -cvf artifact.tar --exclude=.git --exclude=.github . | |
- name: Upload artifact | |
id: upload_artifact | |
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: github-pages | |
path: artifact.tar | |
retention-days: 1 | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
needs: [build] | |
name: Deploy | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deploy_github_pages.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- name: Configure GitHub Pages | |
id: configure_github_pages | |
uses: actions/configure-pages@7110e9e03ffb4a421945e5d0607007b8e9f1f52b # v3.0.5 | |
- name: Deploy to GitHub Pages | |
id: deploy_github_pages | |
uses: actions/deploy-pages@73e62e651178eeba977de2dc9f4c7645b3d01015 # v2.0.0 |