Skip to content

Commit

Permalink
fix(CI): switch gear and deploy to pages using GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Dec 5, 2024
1 parent 12246fd commit 4aba221
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@ jobs:
with:
release-type: terraform-module

tofu-docs:
build-docs:
needs: release-please
if: needs.release-please.outputs.releases_created == 'true'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: write
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -62,15 +67,19 @@ jobs:
tar -xzf terraform-docs.tar.gz
chmod +x terraform-docs
mv terraform-docs /usr/local/bin/terraform-docs
- name: Build the doc
- name: Prepare the docs
run: ./scripts/build-docs.sh
- name: Configure git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Create version
run: |
mike deploy --push --update-aliases ${{ needs.release-please.outputs.tag_name }} latest
- name: Build the docs
run: mkdocs build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

trivy:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4aba221

Please sign in to comment.