|
| 1 | +name: Jekyll site CI |
| 2 | + - name: Setup Node.js environment |
| 3 | + |
| 4 | + with: |
| 5 | + # Set always-auth in npmrc. |
| 6 | + always-auth: # optional, default is false |
| 7 | + # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0. |
| 8 | + node-version: # optional |
| 9 | + # File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions. |
| 10 | + node-version-file: # optional |
| 11 | + # Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default. |
| 12 | + architecture: # optional |
| 13 | + # Set this option if you want the action to check for the latest available version that satisfies the version spec. |
| 14 | + check-latest: # optional |
| 15 | + # Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN. |
| 16 | + registry-url: # optional |
| 17 | + # Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/). |
| 18 | + scope: # optional |
| 19 | + # Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. |
| 20 | + token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }} |
| 21 | + # Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm. |
| 22 | + cache: # optional |
| 23 | + # Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. |
| 24 | + cache-dependency-path: # optional |
| 25 | + |
| 26 | +on: |
| 27 | + push: |
| 28 | + branches: [ "main" ] |
| 29 | + pull_request: |
| 30 | + branches: [ "main" ] |
| 31 | + |
| 32 | +jobs: |
| 33 | + build: |
| 34 | + |
| 35 | + runs-on: ubuntu-latest |
| 36 | + |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + - name: Build the site in the jekyll/builder container |
| 40 | + run: | |
| 41 | + docker run \ |
| 42 | + -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ |
| 43 | + jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future" |
0 commit comments