|
1 | | -# Sample workflow for building and deploying a Jekyll site to GitHub Pages |
2 | | -name: Deploy Jekyll site to Pages |
| 1 | +name: Manually build and deploy site |
3 | 2 |
|
4 | 3 | on: |
5 | 4 | workflow_dispatch: |
6 | | - push: |
7 | | - branches: ["main"] |
8 | | - |
9 | | -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
10 | | -permissions: |
11 | | - contents: read |
12 | | - pages: write |
13 | | - id-token: write |
14 | | - |
15 | | -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
16 | | -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
17 | | -concurrency: |
18 | | - group: "pages" |
19 | | - cancel-in-progress: false |
20 | 5 |
|
21 | 6 | jobs: |
22 | | - # Build job |
23 | | - build: |
| 7 | + deploy: |
24 | 8 | runs-on: ubuntu-latest |
25 | 9 | steps: |
26 | 10 | - name: Checkout |
27 | 11 | uses: actions/checkout@v3 |
28 | | - - name: Setup Ruby |
29 | | - uses: ruby/setup-ruby@v1 |
30 | | - with: |
31 | | - ruby-version: '3.1' |
32 | | - bundler-cache: true |
33 | | - cache-version: 0 # Increment this number if you need to re-download cached gems |
34 | | - - name: Setup Pages |
35 | | - id: pages |
36 | | - uses: actions/configure-pages@v3 |
37 | | - - name: Build with Jekyll |
38 | | - # Outputs to the './_site' directory by default |
39 | | - run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" |
40 | | - env: |
41 | | - JEKYLL_ENV: production |
42 | | - - name: Upload artifact |
43 | | - # Automatically uploads an artifact from the './_site' directory by default |
44 | | - uses: actions/upload-pages-artifact@v2 |
45 | 12 |
|
46 | | - # Deployment job |
47 | | - deploy: |
48 | | - environment: |
49 | | - name: github-pages |
50 | | - url: ${{ steps.deployment.outputs.page_url }} |
51 | | - runs-on: ubuntu-latest |
52 | | - needs: build |
53 | | - steps: |
54 | | - - name: Deploy to GitHub Pages |
55 | | - id: deployment |
56 | | - uses: actions/deploy-pages@v2 |
| 13 | + - name: Netlify manual deploy |
| 14 | + run: | |
| 15 | + npm install -g netlify-cli |
| 16 | + netlify deploy --prod --build --context production |
| 17 | + env: |
| 18 | + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} |
| 19 | + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |
0 commit comments