mirror of https://github.com/docker/docs.git
ci: update github actions accordingly to the new dockerfile
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
ebd36f7081
commit
75cb114327
|
@ -6,25 +6,27 @@ on:
|
|||
- master
|
||||
|
||||
jobs:
|
||||
build-static-page:
|
||||
name: build
|
||||
runs-on: ubuntu-18.04
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.repository == 'docker/docker.github.io'
|
||||
steps:
|
||||
- name: print docker info
|
||||
run: docker version && docker info
|
||||
- uses: actions/checkout@v2
|
||||
- name: build current docs
|
||||
run: docker build --target=deploy-source --output=./_site .
|
||||
- name: upload files to S3 bucket
|
||||
run: aws s3 sync --acl public-read _site s3://docs.docker.com-stage-us-east-1/ --delete
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Build
|
||||
uses: docker/bake-action@v2
|
||||
with:
|
||||
targets: release
|
||||
-
|
||||
name: Upload files to S3 bucket
|
||||
run: |
|
||||
aws s3 sync --acl public-read _site s3://docs.docker.com-stage-us-east-1/ --delete
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
- name: update S3 website config
|
||||
-
|
||||
name: Update S3 website config
|
||||
uses: ./.github/actions/update-website-config
|
||||
with:
|
||||
bucketName: docs.docker.com-stage-us-east-1
|
||||
|
@ -33,16 +35,16 @@ jobs:
|
|||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
- name: invalidate docs website cache
|
||||
run: aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-stage-cache-invalidator response.json
|
||||
-
|
||||
name: Invalidate docs website cache
|
||||
run: |
|
||||
aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-stage-cache-invalidator response.json
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
- name: send slack notification
|
||||
-
|
||||
name: Send Slack notification
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully promoted docs-stage from master. https://docs-stage.docker.com/"}' $SLACK
|
||||
env:
|
||||
SLACK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
|
|
|
@ -3,29 +3,31 @@ name: build docker image when PR is opened
|
|||
on: pull_request
|
||||
|
||||
jobs:
|
||||
build-static-page:
|
||||
name: build
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: print docker info
|
||||
run: docker version && docker info
|
||||
- uses: actions/checkout@v2
|
||||
- name: build image
|
||||
run: docker build --target=current -t documentation:latest .
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Build
|
||||
uses: docker/bake-action@v2
|
||||
with:
|
||||
targets: release
|
||||
|
||||
validate:
|
||||
name: validate links
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: print docker info
|
||||
run: docker version && docker info
|
||||
- uses: actions/checkout@v2
|
||||
- name: copy files to host
|
||||
run: docker build --target=deploy-source --output=./_site .
|
||||
- name: check for broken links
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Build
|
||||
uses: docker/bake-action@v2
|
||||
with:
|
||||
targets: release
|
||||
-
|
||||
name: Check for broken links
|
||||
uses: chabad360/htmlproofer@master
|
||||
with:
|
||||
directory: ./_site
|
||||
|
|
|
@ -6,25 +6,29 @@ on:
|
|||
- published
|
||||
|
||||
jobs:
|
||||
build-static-page:
|
||||
name: build
|
||||
runs-on: ubuntu-18.04
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.repository == 'docker/docker.github.io'
|
||||
steps:
|
||||
- name: print docker info
|
||||
run: docker version && docker info
|
||||
- uses: actions/checkout@v2
|
||||
- name: build current docs
|
||||
run: docker build --build-arg JEKYLL_ENV=production --target=deploy-source --output=./_site .
|
||||
- name: upload files to S3 bucket
|
||||
run: aws s3 sync --acl public-read _site s3://docs.docker.com-us-east-1/ --delete
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Build
|
||||
uses: docker/bake-action@v2
|
||||
with:
|
||||
targets: release
|
||||
env:
|
||||
JEKYLL_ENV: production
|
||||
-
|
||||
name: Upload files to S3 bucket
|
||||
run: |
|
||||
aws s3 sync --acl public-read _site s3://docs.docker.com-us-east-1/ --delete
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
- name: update S3 website config
|
||||
-
|
||||
name: Update S3 website config
|
||||
uses: ./.github/actions/update-website-config
|
||||
with:
|
||||
bucketName: docs.docker.com-us-east-1
|
||||
|
@ -32,17 +36,17 @@ jobs:
|
|||
websiteConfig: _website-config-docs.json
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
- name: invalidate docs website cache
|
||||
run: aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-cache-invalidator response.json
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
-
|
||||
name: Invalidate docs website cache
|
||||
run: |
|
||||
aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-cache-invalidator response.json
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
- name: send slack notification
|
||||
-
|
||||
name: Send Slack notification
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $SLACK
|
||||
env:
|
||||
SLACK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
|
|
Loading…
Reference in New Issue