Skip to content

Commit

Permalink
Update workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Kostromin committed Aug 2, 2023
1 parent a858732 commit ce8db55
Showing 1 changed file with 36 additions and 11 deletions.
47 changes: 36 additions & 11 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
# Sample workflow for building and deploying a VuePress site to GitHub Pages
name: Deploy custom VuePress blog with GitHub Pages artifacts

# Runs on pushes targeting the default branch
on:
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Build for master branches
push:
branches: ["master"]
# Build for PRs
pull_request:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

# Use concrete NodeJS version:
env:
NODE_VERSION: 19.7.0

# Jobs:
jobs:
# Build job:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# See https://github.com/actions/configure-pages
- name: Setup Pages
uses: actions/configure-pages@v1
id: pages
uses: actions/configure-pages@v3

- uses: actions/cache@v3
id: ci
with:
Expand All @@ -36,27 +48,40 @@ jobs:
~/.m2/repository
!~/.m2/repository/com/gituhb/daggerok
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/pom.xml', '**/package.json', '**/package-lock.json') }}

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm i -E
- run: npm run build-github-pages
- name: Upload artifact
#uses: actions/upload-artifact@v2
uses: actions/upload-pages-artifact@v1

# See https://github.com/actions/upload-pages-artifact
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload .vuepress/dist folder
path: '.vuepress/dist'
#name: github-pages
#if-no-files-found: error
# Deployment job:
path: '.vuepress/dist'

# See https://github.com/actions/deploy-pages
# Deployment job
deploy:
# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action

0 comments on commit ce8db55

Please sign in to comment.