diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 320c982..6f19784 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,28 +13,17 @@ jobs: runs-on: ubuntu-latest steps: - - name: Configure AWS credentials - id: aws-credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_SESSION_TOKEN }} + - uses: actions/checkout@v3 - - name: Mask AWS credentials - run: | - echo "AWS_ACCESS_KEY_ID=${{ steps.aws-credentials.outputs.access_key_id }}" | sed 's/./\*/g' >> $GITHUB_ENV - echo "AWS_SECRET_ACCESS_KEY=${{ steps.aws-credentials.outputs.secret_access_key }}" | sed 's/./\*/g' >> $GITHUB_ENV - echo "AWS_SESSION_TOKEN=${{ steps.aws-credentials.outputs.session_token }}" | sed 's/./\*/g' >> $GITHUB_ENV - - - name: Use Node.js 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.x + - name: Use Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: 20.x - - name: Deploy to AWS - run: | - echo "${{ github.event.inputs.awsCredentials }}" | sed 's/./\*/g' > credentials.txt - export $(cat credentials.txt | xargs) - echo "::add-mask::$(cat credentials.txt)" - ./deploy.sh + - name: Deploy to AWS + run: | + echo "${{ github.event.inputs.awsCredentials }}" | tr " " "\n" > credentials + export $(cat credentials.txt | xargs) + echo "::add-mask::$(cat credentials.txt)" + rm credentials.txt + ./deploy.sh