-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate CF Pages to CF Wrangler action (based on jellyfin/jellyfin-web#5894) * Create event-based workflows, all the specific actions are now reusable workflows Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
- Loading branch information
Showing
12 changed files
with
280 additions
and
219 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Reusable workflows should be under a `reusable` folder. Track https://github.com/orgs/community/discussions/10773 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Deploy 🏗️ | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
required: true | ||
type: string | ||
commit: | ||
required: false | ||
type: string | ||
pr_number: | ||
required: false | ||
type: number | ||
comment: | ||
required: false | ||
type: boolean | ||
artifact_name: | ||
required: false | ||
type: string | ||
default: frontend | ||
|
||
jobs: | ||
cf-pages: | ||
name: CloudFlare Pages 📃 | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.branch == 'master' && 'production' || 'preview' }} | ||
outputs: | ||
url: ${{ steps.cf.outputs.deployment-url }} | ||
|
||
steps: | ||
- name: Download workflow artifact ⬇️ | ||
uses: actions/download-artifact@v4.1.8 | ||
with: | ||
name: ${{ inputs.artifact_name }} | ||
path: dist | ||
|
||
- name: Publish to Cloudflare Pages 📃 | ||
uses: cloudflare/wrangler-action@v3.7.0 | ||
id: cf | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
command: pages deploy dist --project-name=jf-vue --branch=${{ inputs.branch }} | ||
|
||
compose-comment: | ||
name: Compose comment 📝 | ||
if: ${{ always() && inputs.comment }} | ||
uses: ./.github/workflows/__job_messages.yml | ||
needs: | ||
- cf-pages | ||
|
||
with: | ||
branch: ${{ inputs.branch }} | ||
commit: ${{ inputs.commit }} | ||
preview_url: ${{ needs.cf-pages.outputs.url }} | ||
build_workflow_run_id: ${{ github.run_id}} | ||
commenting_workflow_run_id: ${{ github.run_id }} | ||
in_progress: false | ||
|
||
comment-status: | ||
name: Create comment status 📊 | ||
if: ${{ always() && inputs.comment && inputs.pr_number }} | ||
runs-on: ubuntu-latest | ||
needs: | ||
- compose-comment | ||
|
||
steps: | ||
- name: Update job summary in PR comment 🔃 | ||
uses: thollander/actions-comment-pull-request@v2.5.0 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }} | ||
message: ${{ needs.compose-comment.outputs.msg }} | ||
pr_number: ${{ inputs.pr_number }} | ||
comment_tag: ${{ needs.compose-comment.outputs.marker }} |
File renamed without changes.
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.