Skip to content

添加 learn-c

添加 learn-c #58

Workflow file for this run

name: Antora Site
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
SITE_DIR: '/build/site'
BRANCH: 'gh-pages'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Antora
run: npm i -g @antora/cli@3.0 @antora/site-generator@3.0 asciidoctor-plantuml
# - name: Asciidoctor Diagram
# run: sudo gem install asciidoctor-diagram
- name: Generate
run: |
npm i asciidoctor-kroki
antora generate playbook.yml
- name: Check
run: "ls -la ${{ github.workspace }}${{ env.SITE_DIR }}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.4.0
with:
folder: "${{ github.workspace }}${{ env.SITE_DIR }}"
branch: "${{ env.BRANCH }}"
force: true
# target-folder: "${{ github.workspace }}${{ env.SITE_DIR }}"
deploy:
needs: [build]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: "${{ env.BRANCH }}"
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire overview
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main