Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ThewBear committed Feb 23, 2024
1 parent 40dfec2 commit ec44b45
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/main.yml
Expand Up @@ -60,7 +60,7 @@ jobs:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT: ${{ secrets.VERCEL_PROJECT }}
- uses: actions/github-script@v6
- uses: actions/github-script@v7
if: github.event_name == 'pull_request'
with:
script: |
Expand All @@ -70,7 +70,7 @@ jobs:
repo: context.repo.repo,
body: `Preview : ${require('fs').readFileSync('previewUrl.txt', 'utf8')} 🚀`
})
- uses: actions/github-script@v6
- uses: actions/github-script@v7
if: github.event_name != 'pull_request'
with:
script: |
Expand All @@ -81,19 +81,13 @@ jobs:
required_contexts: [],
environment: 'preview',
transient_environment: true,
mediaType: {
previews: "ant-man"
}
});
github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'success',
log_url: require('fs').readFileSync('previewUrl.txt', 'utf8'),
mediaType: {
previews: "ant-man"
}
});
deploy_production:
Expand All @@ -119,7 +113,7 @@ jobs:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT: ${{ secrets.VERCEL_PROJECT }}
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const { data: deployment } = await github.rest.repos.createDeployment({
Expand Down

1 comment on commit ec44b45

@ThewBear
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.