Removed external workflow
This commit is contained in:
21
.github/workflows/main.yml
vendored
21
.github/workflows/main.yml
vendored
@@ -26,14 +26,29 @@ jobs:
|
|||||||
path: build
|
path: build
|
||||||
|
|
||||||
deploy-test:
|
deploy-test:
|
||||||
uses: ./.github/workflows/s3_sync.yml
|
|
||||||
needs: build
|
needs: build
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
||||||
|
environment:
|
||||||
|
name: techradar-test-aoe
|
||||||
|
url: http://techradar-test-aoe.s3-website.eu-central-1.amazonaws.com/techradar/index.html
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write
|
id-token: write
|
||||||
contents: read
|
contents: read
|
||||||
if: github.ref == 'refs/heads/main'
|
steps:
|
||||||
|
- name: Configure AWS Credentials
|
||||||
|
uses: aws-actions/configure-aws-credentials@master
|
||||||
with:
|
with:
|
||||||
bucket: techradar-test-aoe
|
aws-region: eu-central-1
|
||||||
|
role-to-assume: arn:aws:iam::511165248623:role/github_techradar
|
||||||
|
role-session-name: GitHubActions
|
||||||
|
- name: Download Artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: build
|
||||||
|
- run: 'aws s3 sync --delete build/ s3://techradar-test-aoe/techradar/'
|
||||||
|
|
||||||
# deploy:
|
# deploy:
|
||||||
# runs-on: ubuntu-20.04
|
# runs-on: ubuntu-20.04
|
||||||
|
|||||||
32
.github/workflows/s3_sync.yml
vendored
32
.github/workflows/s3_sync.yml
vendored
@@ -1,32 +0,0 @@
|
|||||||
name: Reusable S3 Sync
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
bucket:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
s3-sync:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
|
||||||
environment:
|
|
||||||
name: ${{ inputs.bucket }}
|
|
||||||
url: http://${{ inputs.bucket }}.s3-website.eu-central-1.amazonaws.com/techradar/index.html
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- name: Configure AWS Credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@master
|
|
||||||
with:
|
|
||||||
aws-region: eu-central-1
|
|
||||||
role-to-assume: arn:aws:iam::511165248623:role/github_techradar
|
|
||||||
role-session-name: GitHubActions
|
|
||||||
- name: Download Artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: build
|
|
||||||
path: build
|
|
||||||
- run: 'aws s3 sync --delete build/ s3://${{ inputs.bucket }}/techradar/'
|
|
||||||
Reference in New Issue
Block a user