mirror of
https://github.com/ivabus/www
synced 2024-11-23 04:35:06 +03:00
test deploy sls
This commit is contained in:
parent
6b0a43c885
commit
416494a979
1 changed files with 61 additions and 60 deletions
121
.github/workflows/staging.yml
vendored
121
.github/workflows/staging.yml
vendored
|
@ -11,62 +11,62 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: inject slug/short variables
|
# - name: inject slug/short variables
|
||||||
uses: rlespinasse/github-slug-action@v3.x
|
# uses: rlespinasse/github-slug-action@v3.x
|
||||||
- name: Set STAGE variable in environment for next steps
|
# - name: Set STAGE variable in environment for next steps
|
||||||
run: echo "STAGE=pr-${{ github.event.number }}-${{ env.GITHUB_HEAD_REF_SLUG }}" >> $GITHUB_ENV
|
# run: echo "STAGE=pr-${{ github.event.number }}-${{ env.GITHUB_HEAD_REF_SLUG }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create Deployment
|
# - name: Create Deployment
|
||||||
uses: bobheadxi/deployments@v1
|
# uses: bobheadxi/deployments@v1
|
||||||
id: deployment
|
# id: deployment
|
||||||
with:
|
# with:
|
||||||
step: start
|
# step: start
|
||||||
env: ${{ env.STAGE }}
|
# env: ${{ env.STAGE }}
|
||||||
ref: ${{ github.head_ref }}
|
# ref: ${{ github.head_ref }}
|
||||||
override: true
|
# override: true
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
# - uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Apply Staging Configuration
|
# - name: Apply Staging Configuration
|
||||||
run: |
|
# run: |
|
||||||
sed -i -e 's/^baseURL\s*=.*$/baseUrl = ""/i' config.toml
|
# sed -i -e 's/^baseURL\s*=.*$/baseUrl = ""/i' config.toml
|
||||||
echo "relativeurls = true" >>config.toml
|
# echo "relativeurls = true" >>config.toml
|
||||||
working-directory: src
|
# working-directory: src
|
||||||
|
|
||||||
- name: Copy packages.json summary from dist.tea.xyz
|
# - name: Copy packages.json summary from dist.tea.xyz
|
||||||
uses: prewk/s3-cp-action@v2
|
# uses: prewk/s3-cp-action@v2
|
||||||
with:
|
# with:
|
||||||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
source: 's3://dist.tea.xyz/mock_packages.json'
|
# source: 's3://dist.tea.xyz/mock_packages.json'
|
||||||
dest: './src/data/packages.json'
|
# dest: './src/data/packages.json'
|
||||||
|
|
||||||
- name: Create Package Detail Pages from packages.json
|
# - name: Create Package Detail Pages from packages.json
|
||||||
uses: getneil/jq-action@v1
|
# uses: getneil/jq-action@v1
|
||||||
id: version
|
# id: version
|
||||||
with:
|
# with:
|
||||||
cmd: '.github/build-package-pages.sh src/data/packages.json src/content/packages'
|
# cmd: '.github/build-package-pages.sh src/data/packages.json src/content/packages'
|
||||||
|
|
||||||
- run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
|
# - run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
# - uses: teaxyz/setup@v0
|
||||||
with:
|
# with:
|
||||||
target: build
|
# target: build
|
||||||
|
|
||||||
- name: Check for broken links
|
# - name: Check for broken links
|
||||||
uses: lycheeverse/lychee-action@v1
|
# uses: lycheeverse/lychee-action@v1
|
||||||
with:
|
# with:
|
||||||
fail: true
|
# fail: true
|
||||||
args: --verbose --no-progress './public/**/*.md' './public/**/*.html'
|
# args: --verbose --no-progress './public/**/*.md' './public/**/*.html'
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
# - uses: actions/setup-node@v3
|
||||||
with:
|
# with:
|
||||||
node-version: 14
|
# node-version: 14
|
||||||
- uses: bahmutov/npm-install@v1
|
# - uses: bahmutov/npm-install@v1
|
||||||
with:
|
# with:
|
||||||
working-directory: .cdk
|
# working-directory: .cdk
|
||||||
|
|
||||||
- uses: aws-actions/configure-aws-credentials@v1
|
- uses: aws-actions/configure-aws-credentials@v1
|
||||||
with:
|
with:
|
||||||
|
@ -74,10 +74,10 @@ jobs:
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
aws-region: us-east-1
|
aws-region: us-east-1
|
||||||
|
|
||||||
- name: Deploy to AWS
|
# - name: Deploy to AWS
|
||||||
id: cdk_deploy
|
# id: cdk_deploy
|
||||||
run: yarn deploy
|
# run: yarn deploy
|
||||||
working-directory: .cdk
|
# working-directory: .cdk
|
||||||
|
|
||||||
- uses: borales/actions-yarn@v3.0.0
|
- uses: borales/actions-yarn@v3.0.0
|
||||||
with:
|
with:
|
||||||
|
@ -88,13 +88,14 @@ jobs:
|
||||||
uses: Teakowa/serverless-action@master
|
uses: Teakowa/serverless-action@master
|
||||||
with:
|
with:
|
||||||
args: --stage prod deploy
|
args: --stage prod deploy
|
||||||
|
working-directory: lambdas
|
||||||
|
|
||||||
- name: Seal Deployment
|
# - name: Seal Deployment
|
||||||
uses: bobheadxi/deployments@v1
|
# uses: bobheadxi/deployments@v1
|
||||||
if: always()
|
# if: always()
|
||||||
with:
|
# with:
|
||||||
step: finish
|
# step: finish
|
||||||
status: ${{ job.status }}
|
# status: ${{ job.status }}
|
||||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
# deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
env: ${{ env.STAGE }}
|
# env: ${{ env.STAGE }}
|
||||||
env_url: ${{ steps.cdk_deploy.outputs.env_url }}
|
# env_url: ${{ steps.cdk_deploy.outputs.env_url }}
|
||||||
|
|
Loading…
Reference in a new issue