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

Test action deploy #283

Merged
merged 1 commit into from
Jun 23, 2023
Merged
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
56 changes: 51 additions & 5 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Documentation
name: Publish docs

on:
push:
Expand All @@ -8,17 +8,63 @@ on:
repository_dispatch:
types: [publish-docs]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
publish-docs:
build:
runs-on: ubuntu-latest
outputs:
artifact: ${{ steps.mkdocs.outputs.artifact }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup config
uses: athackst/athackst.mkdocs@main
- name: Build and push docs to gh-pages
id: mkdocs
uses: athackst/mkdocs-simple-plugin@main
- name: Htmlproofer
uses: athackst/htmlproofer-action@main
with:
directory: site
push: false
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: 'github-pages'
path: ${{ steps.mkdocs.outputs.artifact }}
retention-days: 1

test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: github-pages
- name: Extract
run: |
mkdir _site
tar --directory _site -xvf ${{ needs.build.outputs.artifact }}
tree
- name: Test with htmlproofer
uses: athackst/htmlproofer-action@main

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [build,test]
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2