Skip to content

[校对&发布][news] Ubuntu 24.04 LTS Can Now Do What It Should Have Always … #21

[校对&发布][news] Ubuntu 24.04 LTS Can Now Do What It Should Have Always …

[校对&发布][news] Ubuntu 24.04 LTS Can Now Do What It Should Have Always … #21

Workflow file for this run

name: Publish Articles
on:
push:
branches: [ "main" ]
paths:
- published/**/*.md
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Delete Existing Publish Branch
uses: dawidd6/action-delete-branch@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branches: published
- name: Publish Articles
uses: LarchLiu/actions-save-files@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: published
publish_dir: published
destination_dir: .
exclude_assets: '.github,README.md'
- name: Ask Website Repository to Deploy
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: FOSScope/fosscope.com
PARENT_BRANCH: main
WORKFLOW_ID: 110012392 # Sync Translation Articles
run: |
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'