✨ Ajout de la modélisation de l'impact pour le référentiel action #123
This file contains hidden or 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: Deploy to Scaleway | |
on: | |
push: | |
branches: | |
- preprod | |
- master | |
pull_request: | |
branches: | |
- preprod | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
cache: 'yarn' | |
- name: Set up AWS CLI version | |
run: | | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip" | |
unzip awscliv2.zip | |
sudo ./aws/install --update | |
- name: Verify AWS CLI Version | |
run: aws --version | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run compile script | |
run: yarn compile | |
- name: Upload to Scaleway bucket | |
run: | | |
if [ -n "${{ github.event.pull_request }}" ]; then | |
FILES_PATH=model/${{ github.event.pull_request.number }} | |
elif [[ "${GITHUB_REF#refs/heads/}" == "master" ]]; then | |
FILES_PATH=model/master | |
else | |
FILES_PATH=model/nightly | |
fi | |
AWS_ACCESS_KEY_ID=${{ secrets.SCW_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.SCW_SECRET_KEY }} aws s3 rm s3://${{ vars.BUCKET_NAME }}/$FILES_PATH --recursive --endpoint-url ${{ vars.BUCKET_ENDPOINT }} | |
AWS_ACCESS_KEY_ID=${{ secrets.SCW_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.SCW_SECRET_KEY }} aws s3 cp public s3://${{ vars.BUCKET_NAME }}/$FILES_PATH --recursive --endpoint-url ${{ vars.BUCKET_ENDPOINT }} --acl public-read |