Skip nonauth tests when missing capability #4
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: Test Building (and Deploy Documentation to GitHub Pages) | |
on: | |
workflow_dispatch: | |
push: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Setup Pages | |
if: ${{ github.repository == 'dovecot/imaptest' && github.ref == 'refs/heads/main' }} | |
uses: actions/configure-pages@v3 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build with VitePress | |
run: | | |
npm run docs:build | |
touch docs/.vitepress/dist/.nojekyll | |
- name: Upload Artifact | |
if: ${{ github.repository == 'dovecot/imaptest' && github.ref == 'refs/heads/main' }} | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: docs/.vitepress/dist | |
deploy: | |
if: ${{ github.repository == 'dovecot/imaptest' && github.ref == 'refs/heads/main' }} | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
name: Deploy | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |