Деплой блога на тестинг #1991
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
name: Деплой блога на тестинг | |
on: | |
workflow_dispatch: | |
inputs: | |
kuberta_system: | |
jobs: | |
deploy: | |
name: Сборка тестинга | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: docker://quay.csssr.cloud/csssr/kuberta-init-workflow:v1 | |
- name: Download CSSSR actions | |
uses: actions/checkout@v2 | |
with: | |
repository: CSSSR/actions | |
ssh-key: ${{ secrets.DOWNLOAD_ACTIONS_SSH_KEY }} | |
path: actions | |
- uses: actions/checkout@v2 | |
with: | |
path: new_blog | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@csssr' | |
- name: Install dependencies | |
working-directory: new_blog | |
run: yarn install --frozen-lockfile | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_REGISTRY_TOKEN }} | |
- uses: docker://quay.csssr.cloud/csssr/github-info:v1 | |
id: gh | |
- name: Build testing | |
working-directory: new_blog | |
run: yarn build | |
env: | |
BLOG_HOST: https://${{ steps.gh.outputs.releaseID }}.csssr-new-blog.csssr.cloud | |
COM_HOST: https://master.com.csssr.cloud | |
- name: Import secrets | |
id: secrets | |
uses: hashicorp/[email protected] | |
with: | |
url: https://vault.csssr.com:8200 | |
jwtGithubAudience: ${{secrets.VAULT_JWT_KEY}} | |
role: s3-cdn-upload | |
method: jwt | |
exportEnv: false | |
secrets: | | |
aws/sts/s3-cdn-upload access_key | AWS_ACCESS_KEY_ID ; | |
aws/sts/s3-cdn-upload secret_key | AWS_SECRET_ACCESS_KEY ; | |
aws/sts/s3-cdn-upload security_token | AWS_SESSION_TOKEN ; | |
- uses: ./actions/upload-static/v1beta1 | |
with: | |
project-id: csssr-new-blog | |
files: ./new_blog/out | |
no-previous-files: 'true' | |
auth: 'aws:${{steps.secrets.outputs.AWS_ACCESS_KEY_ID}}:${{steps.secrets.outputs.AWS_SECRET_ACCESS_KEY}}:${{steps.secrets.outputs.AWS_SESSION_TOKEN}}' |