Skip to content

Instantly share code, notes, and snippets.

@enyo
Last active October 14, 2021 17:21
Show Gist options
  • Select an option

  • Save enyo/bc74be652874c9bbb4ce8caac9527bc6 to your computer and use it in GitHub Desktop.

Select an option

Save enyo/bc74be652874c9bbb4ce8caac9527bc6 to your computer and use it in GitHub Desktop.

Revisions

  1. enyo revised this gist Oct 14, 2021. 1 changed file with 23 additions and 23 deletions.
    46 changes: 23 additions & 23 deletions deploy.yaml
    Original file line number Diff line number Diff line change
    @@ -5,28 +5,28 @@ jobs:
    # ...

    deploy:
    # Only run if merged to main.
    if: github.ref == 'refs/heads/main'
    # Only deploy if all tests passed.
    needs: [build, test]
    # Only run if merged to main.
    if: github.ref == 'refs/heads/main'
    # Only deploy if all tests passed.
    needs: [build, test]

    runs-on: ubuntu-latest
    runs-on: ubuntu-latest

    steps:
    # No need to checkout the project, since all we need is to download
    # the build artifact from the build step.
    - uses: actions/download-artifact@v2
    with:
    name: build
    path: build
    # This seems to be the simplest way to publish to a separate branch.
    - name: Deploy
    uses: peaceiris/actions-gh-pages@v3
    with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    publish_branch: gh-pages
    publish_dir: ./build
    # Optional. This will create a CNAME file so GitHub Pages
    # serves it under this domain.
    cname: www.dropzone.dev
    steps:
    # No need to checkout the project, since all we need is to download the
    # build artifact from the build step.
    - uses: actions/download-artifact@v2
    with:
    name: build
    path: build

    # This seems to be the simplest way to publish to a separate branch.
    - name: Deploy
    uses: peaceiris/actions-gh-pages@v3
    with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    publish_branch: gh-pages
    publish_dir: ./build
    # Optional. This will create a CNAME file so GitHub Pages serves it
    # under this domain.
    cname: www.dropzone.de
  2. enyo revised this gist Oct 14, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions deploy.yaml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,9 @@
    jobs:
    build:
    # ...
    test:
    # ...

    deploy:
    # Only run if merged to main.
    if: github.ref == 'refs/heads/main'
  3. enyo created this gist Oct 14, 2021.
    27 changes: 27 additions & 0 deletions deploy.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    jobs:
    deploy:
    # Only run if merged to main.
    if: github.ref == 'refs/heads/main'
    # Only deploy if all tests passed.
    needs: [build, test]

    runs-on: ubuntu-latest

    steps:
    # No need to checkout the project, since all we need is to download
    # the build artifact from the build step.
    - uses: actions/download-artifact@v2
    with:
    name: build
    path: build

    # This seems to be the simplest way to publish to a separate branch.
    - name: Deploy
    uses: peaceiris/actions-gh-pages@v3
    with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    publish_branch: gh-pages
    publish_dir: ./build
    # Optional. This will create a CNAME file so GitHub Pages
    # serves it under this domain.
    cname: www.dropzone.dev