mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2024-12-19 04:44:41 -05:00
ci: Build blog automatically on release
This commit is contained in:
parent
0b78517a9d
commit
d62e221615
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@ -27,6 +27,9 @@ on:
|
|||||||
strict:
|
strict:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
cache:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -119,6 +122,7 @@ jobs:
|
|||||||
- name: Restore Privacy Plugin Cache
|
- name: Restore Privacy Plugin Cache
|
||||||
uses: actions/cache/restore@v4.0.2
|
uses: actions/cache/restore@v4.0.2
|
||||||
id: privacy_cache_restore
|
id: privacy_cache_restore
|
||||||
|
if: inputs.cache
|
||||||
with:
|
with:
|
||||||
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }}
|
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }}
|
||||||
path: |
|
path: |
|
||||||
@ -131,6 +135,7 @@ jobs:
|
|||||||
- name: Restore Social Plugin Cache
|
- name: Restore Social Plugin Cache
|
||||||
uses: actions/cache/restore@v4.0.2
|
uses: actions/cache/restore@v4.0.2
|
||||||
id: social_cache_restore
|
id: social_cache_restore
|
||||||
|
if: inputs.cache
|
||||||
with:
|
with:
|
||||||
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
|
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
|
||||||
path: |
|
path: |
|
||||||
@ -143,6 +148,7 @@ jobs:
|
|||||||
- name: Restore Optimize Plugin Cache
|
- name: Restore Optimize Plugin Cache
|
||||||
uses: actions/cache/restore@v4.0.2
|
uses: actions/cache/restore@v4.0.2
|
||||||
id: optimize_cache_restore
|
id: optimize_cache_restore
|
||||||
|
if: inputs.cache
|
||||||
with:
|
with:
|
||||||
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
|
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
|
||||||
path: |
|
path: |
|
||||||
@ -176,7 +182,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Find Privacy Plugin Cache
|
- name: Find Privacy Plugin Cache
|
||||||
uses: actions/cache/restore@v4.0.2
|
uses: actions/cache/restore@v4.0.2
|
||||||
if: steps.privacy_cache_restore.outputs.cache-hit != 'true'
|
if: steps.privacy_cache_restore.outputs.cache-hit != 'true' && inputs.cache
|
||||||
id: privacy_cache_test
|
id: privacy_cache_test
|
||||||
with:
|
with:
|
||||||
key: privacy-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/privacy/**') }}
|
key: privacy-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/privacy/**') }}
|
||||||
@ -186,7 +192,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Find Social Plugin Cache
|
- name: Find Social Plugin Cache
|
||||||
uses: actions/cache/restore@v4.0.2
|
uses: actions/cache/restore@v4.0.2
|
||||||
if: steps.social_cache_restore.outputs.cache-hit != 'true'
|
if: steps.social_cache_restore.outputs.cache-hit != 'true' && inputs.cache
|
||||||
id: social_cache_test
|
id: social_cache_test
|
||||||
with:
|
with:
|
||||||
key: social-cache-privacyguides/privacyguides.org-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
|
key: social-cache-privacyguides/privacyguides.org-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
|
||||||
@ -197,7 +203,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Find Optimize Plugin Cache
|
- name: Find Optimize Plugin Cache
|
||||||
uses: actions/cache/restore@v4.0.2
|
uses: actions/cache/restore@v4.0.2
|
||||||
if: steps.optimize_cache_restore.outputs.cache-hit != 'true'
|
if: steps.optimize_cache_restore.outputs.cache-hit != 'true' && inputs.cache
|
||||||
id: optimize_cache_test
|
id: optimize_cache_test
|
||||||
with:
|
with:
|
||||||
key: optimize-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
|
key: optimize-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
|
||||||
@ -207,14 +213,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Save Privacy Plugin Cache
|
- name: Save Privacy Plugin Cache
|
||||||
uses: actions/cache/save@v4.0.2
|
uses: actions/cache/save@v4.0.2
|
||||||
if: steps.privacy_cache_test.outputs.cache-hit != 'true'
|
if: steps.privacy_cache_test.outputs.cache-hit != 'true' && inputs.cache
|
||||||
with:
|
with:
|
||||||
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }}
|
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }}
|
||||||
path: .cache/plugin/privacy
|
path: .cache/plugin/privacy
|
||||||
|
|
||||||
- name: Save Social Plugin Cache
|
- name: Save Social Plugin Cache
|
||||||
uses: actions/cache/save@v4.0.2
|
uses: actions/cache/save@v4.0.2
|
||||||
if: steps.social_cache_test.outputs.cache-hit != 'true'
|
if: steps.social_cache_test.outputs.cache-hit != 'true' && inputs.cache
|
||||||
with:
|
with:
|
||||||
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
|
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
|
||||||
path: |
|
path: |
|
||||||
@ -223,7 +229,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Save Optimize Plugin Cache
|
- name: Save Optimize Plugin Cache
|
||||||
uses: actions/cache/save@v4.0.2
|
uses: actions/cache/save@v4.0.2
|
||||||
if: steps.optimize_cache_test.outputs.cache-hit != 'true'
|
if: steps.optimize_cache_test.outputs.cache-hit != 'true' && inputs.cache
|
||||||
with:
|
with:
|
||||||
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
|
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
|
||||||
path: .cache/plugin/optimize
|
path: .cache/plugin/optimize
|
||||||
|
15
.github/workflows/publish-release.yml
vendored
15
.github/workflows/publish-release.yml
vendored
@ -62,6 +62,17 @@ jobs:
|
|||||||
lang: ${{ matrix.lang }}
|
lang: ${{ matrix.lang }}
|
||||||
context: production
|
context: production
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
build_blog:
|
||||||
|
needs: submodule
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
uses: ./.github/workflows/build-blog.yml
|
||||||
|
with:
|
||||||
|
repo: ${{ github.repository }}
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create release notes
|
name: Create release notes
|
||||||
@ -84,7 +95,7 @@ jobs:
|
|||||||
makeLatest: true
|
makeLatest: true
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: build
|
needs: [build, build_blog]
|
||||||
uses: privacyguides/webserver/.github/workflows/deploy-all.yml@main
|
uses: privacyguides/webserver/.github/workflows/deploy-all.yml@main
|
||||||
secrets:
|
secrets:
|
||||||
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
|
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
|
||||||
@ -101,5 +112,5 @@ jobs:
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
needs: build
|
needs: [build, build_blog]
|
||||||
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
||||||
|
Loading…
Reference in New Issue
Block a user