Skip to content
Compare
Choose a tag to compare
@JamesIves JamesIves released this 19 Nov 15:30
· 638 commits to releases/v3 since this release

Version 3 includes a number of breaking changes. Please refer to the migration guide at the bottom of this release for details on how to update. If you have any problems please open an issue.

Major Changes

  • Completely re-written the action from a shell script into a JavaScript based action with Typescript. This will allow the action to finish its process much faster.
  • Made a change so the action will no longer run a build script. This has been outlined in the migration guide and the documentation.
  • The action will no longer generate a CNAME file for you automatically.
  • Adjusted the order of the Git commands so the entire history is left intact.

Minor Changes

  • Instead of env, the action now utilizes the with keyword in the workflow file.
  • Overhauled all of the tests. There's now unit tests and integration tests.
  • Improved the documentation, added details in the CONTRIBUTING file about deploying your own instance, and added GitHub badges that link to the new tests.
  • Added a releases/v2 branch for legacy support.

Migration Guide

If you're coming from version 2 there's a few changes you'll need to make.

  1. Adjust env to with in your workflow file.
  2. Remove the BUILD_SCRIPT from your v2 workflow file, and have it run as its own step. This should look something like this:
    - name: Install
      run: |
        npm install
        npm run-script build
  1. Change the reference from JamesIves/github-pages-deploy-action@releases/v2 or JamesIves/github-pages-deploy-action@master to JamesIves/github-pages-deploy-action@releases/v3. This will point your action towards the v3 and above branch.

  2. Run the workflow for the first time by making a change. Once it's done manually commit any required CNAME or .nojekyll files into the deployment branch. This will only need to be done once as the Git history remains intact, so the action will not wipe out these files during future deployments.

  3. Once the steps have been completed the action should deploy as expected.

Config Changes

You can find an example of a v2 config and the same v3 config below.

v2

name: integration
on: [push]
jobs:
  integration-test:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v1
    - name: Build and Deploy
      uses: JamesIves/github-pages-deploy-action@releases/v2
      env:
        ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        BRANCH: gh-pages
        FOLDER: 'test/build'
        BUILD_SCRIPT: npm install && npm run-script build

v3

name: integration
on: [push]
jobs:
  integration-test:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v1
    - name: Install
      run: |
        npm install
        npm run-script build
    - name: Build and Deploy
      uses: JamesIves/github-pages-deploy-action@releases/v3
      with:
        ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        BRANCH: gh-pages
        FOLDER: 'test/build'