Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
paths-ignore:
- 'README.md'
- 'Release.md'
- '.github/workflows/release.yaml'
- '.github/workflows/test.yaml'
- '.github/**'

jobs:
build:
Expand All @@ -30,21 +29,3 @@ jobs:
echo "Artifact not found!"
exit 1
fi

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: eu-west-1

- name: Deploy latest docs to S3
run: |
mkdir -p tmp_extracted
tar -xzf ./wire-docs.tar.gz -C tmp_extracted

# removing old objects from the bucket to ensure, we don't keep objects at old path
aws s3 rm s3://${{ secrets.BUCKET }}/latest --recursive
aws s3 sync tmp_extracted/latest s3://${{ secrets.BUCKET }}/latest

aws s3 cp tmp_extracted/versions.json s3://${{ secrets.BUCKET }}/versions.json
rm -rf tmp_extracted
50 changes: 50 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Prod Env Latest Build and Deploy to S3

on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'Release.md'
- '.github/**'

jobs:

deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Nix
uses: cachix/install-nix-action@v16

- name: Build Archive
id: build_archive
run: |
make archive
if [ ! -f "wire-docs.tar.gz" ]; then
echo "Artifact not found!"
exit 1
fi

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: eu-west-1

- name: Deploy latest docs to S3
run: |
mkdir -p tmp_extracted
tar -xzf ./wire-docs.tar.gz -C tmp_extracted

# removing old objects from the bucket to ensure, we don't keep objects at old path
aws s3 rm s3://${{ secrets.BUCKET }}/latest --recursive
aws s3 sync tmp_extracted/latest s3://${{ secrets.BUCKET }}/latest

# aws s3 cp tmp_extracted/versions.json s3://${{ secrets.BUCKET }}/versions.json
rm -rf tmp_extracted
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ jobs:
asset_path: ./wire-docs-${{ github.ref_name }}.tar.gz
asset_name: wire-docs-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip

7 changes: 3 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Env Latest Build
name: Test Env Latest Build and Deploy to S3

on:
pull_request:
Expand All @@ -7,8 +7,7 @@ on:
paths-ignore:
- 'README.md'
- 'Release.md'
- '.github/workflows/release.yaml'
- '.github/workflows/build.yaml'
- '.github/**'

jobs:
test:
Expand Down Expand Up @@ -46,5 +45,5 @@ jobs:
aws s3 rm s3://${{ secrets.DEV_BUCKET }}/latest --recursive
aws s3 sync tmp_extracted/latest s3://${{ secrets.DEV_BUCKET }}/latest

aws s3 cp tmp_extracted/versions.json s3://${{ secrets.DEV_BUCKET }}/versions.json
# aws s3 cp tmp_extracted/versions.json s3://${{ secrets.DEV_BUCKET }}/versions.json
rm -rf tmp_extracted
2 changes: 1 addition & 1 deletion wire-server
Submodule wire-server updated 397 files