|
1 | | -# Simple workflow for deploying static content to GitHub Pages |
2 | | -name: Deploy static content to Pages |
| 1 | +name: Deploy yard to Pages |
3 | 2 |
|
4 | 3 | on: |
5 | | - # Runs on pushes targeting the default branch |
6 | 4 | push: |
7 | 5 | branches: |
8 | 6 | - main |
9 | | - |
10 | | - # Allows you to run this workflow manually from the Actions tab |
11 | 7 | workflow_dispatch: |
12 | 8 |
|
13 | | -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
14 | 9 | permissions: |
15 | 10 | contents: read |
16 | 11 | pages: write |
17 | 12 | id-token: write |
18 | 13 |
|
19 | | -# Allow one concurrent deployment |
20 | | -concurrency: |
21 | | - group: "pages" |
22 | | - cancel-in-progress: true |
23 | | - |
24 | 14 | jobs: |
25 | | - # Single deploy job since we're just deploying |
26 | 15 | deploy: |
27 | | - environment: |
28 | | - name: github-pages |
29 | | - url: ${{ steps.deployment.outputs.page_url }} |
30 | | - runs-on: ubuntu-latest |
31 | | - steps: |
32 | | - - name: Checkout |
33 | | - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 |
34 | | - |
35 | | - - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0 |
36 | | - with: |
37 | | - ruby-version: ruby |
38 | | - bundler-cache: true |
39 | | - |
40 | | - - run: bundle exec yard |
41 | | - |
42 | | - - name: Setup Pages |
43 | | - uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 |
44 | | - - name: Upload artifact |
45 | | - uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 |
46 | | - with: |
47 | | - # Upload entire repository |
48 | | - path: './doc' |
49 | | - - name: Deploy to GitHub Pages |
50 | | - id: deployment |
51 | | - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |
52 | | - |
53 | | - - name: Slack Notification (not success) |
54 | | - uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2 |
55 | | - if: "! success()" |
56 | | - continue-on-error: true |
57 | | - with: |
58 | | - status: ${{ job.status }} |
59 | | - webhook-url: ${{ secrets.SLACK_WEBHOOK }} |
| 16 | + uses: sue445/workflows/.github/workflows/pages-yard.yml@main |
| 17 | + secrets: |
| 18 | + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} |
0 commit comments