Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
.jekyll-metadata
.sass-cache
tests
_releaser
_site
CONTRIBUTING.md
Dockerfile
docker-compose.yml
_website*.json
/vendor
8 changes: 0 additions & 8 deletions .github/actions/netlify-clean/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions .github/actions/netlify-clean/action.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/actions/netlify-clean/entrypoint.sh

This file was deleted.

1 change: 0 additions & 1 deletion .github/actions/netlify-deploy/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions .github/actions/netlify-deploy/Dockerfile

This file was deleted.

23 changes: 0 additions & 23 deletions .github/actions/netlify-deploy/action.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/actions/netlify-deploy/entrypoint.sh

This file was deleted.

2 changes: 0 additions & 2 deletions .github/actions/update-website-config/.dockerignore

This file was deleted.

11 changes: 0 additions & 11 deletions .github/actions/update-website-config/Dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions .github/actions/update-website-config/action.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/actions/update-website-config/go.mod

This file was deleted.

18 changes: 0 additions & 18 deletions .github/actions/update-website-config/go.sum

This file was deleted.

70 changes: 0 additions & 70 deletions .github/actions/update-website-config/main.go

This file was deleted.

30 changes: 19 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,22 @@ jobs:
set: |
*.cache-from=type=gha,scope=build

# Disabled netlify-deploy due to flakey 502 http errors
# - name: copy static files
# if: github.event.pull_request.head.repo.fork == false
# run: docker run -v ${PWD}:/output documentation:latest cp -r /usr/share/nginx/html /output/_site
# - uses: ./.github/actions/netlify-deploy
# if: github.event.pull_request.head.repo.fork == false
# with:
# directory: _site
# netlify_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# netlify_account_slug: ${{ secrets.NETLIFY_ACCOUNT_SLUG }}
# site_name: "${{ github.repository }}/${{ github.head_ref }}"
Comment on lines -52 to -62
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this refactoring we might enable this workflow and see if it works fine now but don't think it's necessary to have it anymore if we want to only accept pull requests from forks and disable auto publish. Step would look like this:

      -
        name: Netlify deploy
        if: github.event.pull_request.head.repo.fork == false
        uses: docker/bake-action@v2
        with:
          targets: netlify-deploy
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_ACCOUNT_SLUG: ${{ secrets.NETLIFY_ACCOUNT_SLUG }}
          NETLIFY_SITE_NAME: ${{ github.repository }}/${{ github.head_ref }}
          NETLIFY_PUBLISH_DIR: "_site"

# build-releaser job will just build _releaser app used for Netlify and
# AWS deployment in publish workflow. it's just to be sure it builds correctly.
build-releaser:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: docker/bake-action@v2
with:
targets: releaser-build
set: |
*.cache-from=type=gha,scope=releaser
*.cache-to=type=gha,scope=releaser,mode=max
24 changes: 15 additions & 9 deletions .github/workflows/clean-pr.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
name: remove published site from netlify
name: clean-pr

on:
pull_request:
types:
- closed

jobs:
remove-site-from-netlify:
name: build
runs-on: ubuntu-18.04
netlify-remove:
runs-on: ubuntu-20.04
if: github.event.pull_request.head.repo.fork == false
steps:
- uses: actions/checkout@v2
-
name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: delete from netlify
uses: ./.github/actions/netlify-clean
-
name: Remove site from Netlify
uses: docker/bake-action@v2
with:
netlify_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
site_name: "${{ github.repository }}/${{ github.head_ref }}"
targets: netlify-remove
set: |
*.cache-from=type=gha,scope=releaser
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_NAME: ${{ github.repository }}/${{ github.head_ref }}
Loading