forked from mattermost/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace circleci to use github actions and add internal job for deplo…
…yment (mattermost#5378)
- Loading branch information
Carlos Tadeu Panato Junior
authored
Jan 21, 2022
1 parent
ea2aff0
commit 7769536
Showing
4 changed files
with
92 additions
and
86 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- staging | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
|
||
- name: Run Python deps | ||
run: make python-deps | ||
|
||
- name: Run build | ||
run: make html | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: docs | ||
path: build/html | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: doc-logs | ||
path: build/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This run in the mattermost gitlab internal instace | ||
variables: | ||
AWS_DEFAULT_REGION: "us-east-1" | ||
|
||
IMAGE_BUILD: cimg/python:3.7 | ||
IMAGE_AWS_CI: $CI_REGISTRY/images/aws-ci:2.1.1-1 | ||
|
||
stages: | ||
- build | ||
- deploy | ||
|
||
build-package: | ||
stage: build | ||
image: $IMAGE_BUILD | ||
before_script: | ||
- make python-deps | ||
script: | ||
- make html | ||
artifacts: | ||
paths: | ||
- ./build/html | ||
expire_in: 2 hours | ||
only: | ||
refs: | ||
- master | ||
- staging | ||
|
||
s3-release-prod: | ||
image: $IMAGE_AWS_CI | ||
stage: deploy | ||
script: | ||
- aws s3 cp build/html s3://docs.mattermost.com/ --recursive --cache-control no-cache --acl public-read | ||
needs: | ||
- build-package | ||
only: | ||
refs: | ||
- master | ||
|
||
s3-release-staging: | ||
image: $IMAGE_AWS_CI | ||
stage: deploy | ||
script: | ||
- aws s3 cp build/html s3://docs-stagging.mattermost.com/ --recursive --cache-control no-cache --acl public-read | ||
needs: | ||
- build-package | ||
only: | ||
refs: | ||
- staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters