mirror of
https://github.com/HandBrake/HandBrake-docs.git
synced 2025-12-10 00:44:52 -06:00
Bumps [dev-drprasad/delete-older-releases](https://github.com/dev-drprasad/delete-older-releases) from 0.2.0 to 0.2.1. - [Release notes](https://github.com/dev-drprasad/delete-older-releases/releases) - [Commits](https://github.com/dev-drprasad/delete-older-releases/compare/v0.2.0...v0.2.1) --- updated-dependencies: - dependency-name: dev-drprasad/delete-older-releases dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
101 lines
2.5 KiB
YAML
101 lines
2.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
handle_forks:
|
|
name: Forked Repo
|
|
runs-on: ubuntu-latest
|
|
if: github.repository != 'HandBrake/HandBrake-docs'
|
|
steps:
|
|
- name: Print Warning
|
|
run: |
|
|
echo "Builds are disabled for forked repositories."
|
|
|
|
build:
|
|
name: Build on Ubuntu
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'HandBrake/HandBrake-docs'
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Toolchain Cache
|
|
id: build-toolchain
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: tools/local
|
|
key: build-toolchain
|
|
|
|
- name: Build Toolchain
|
|
if: steps.build-toolchain.outputs.cache-hit != 'true'
|
|
run: |
|
|
git submodule update --init
|
|
./build-tools
|
|
ls -la
|
|
|
|
- name: Build
|
|
run: |
|
|
bash ./marsh build --markdown="tools/local/bin/markdown"
|
|
gitrev=$(git rev-parse --short HEAD)
|
|
cd public
|
|
tar cvzf HandBrake_Documentation.$gitrev.tar.gz docs
|
|
cp *.tar.gz ../
|
|
cd ..
|
|
|
|
- uses: actions/upload-artifact@master
|
|
with:
|
|
name: docs
|
|
path: HandBrake_Documentation*.tar.gz
|
|
|
|
|
|
publish:
|
|
name: Publish Documentation
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
if: github.repository == 'HandBrake/HandBrake-docs'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Download Artifacts - Documentation
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: docs
|
|
path: docs/
|
|
|
|
# Generate Hashes
|
|
- name: Generate SHA265 Hashes
|
|
run: |
|
|
cd docs
|
|
sha256sum * > sha256.txt
|
|
cp sha256.txt ../.github/workflows/
|
|
cd ..
|
|
cd .github/workflows/
|
|
sed -e 's/ / | /' -i sha256.txt
|
|
sed -e 's/^/| /' -i sha256.txt
|
|
sed -e 's/$/ |/' -i sha256.txt
|
|
cat sha256.txt >> rel_body.md
|
|
|
|
# Publishing the Release
|
|
- name: Remove the old Release
|
|
uses: dev-drprasad/delete-older-releases@v0.2.1
|
|
with:
|
|
keep_latest: 0
|
|
delete_tag_pattern: "docs"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Update Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: "docs/*.*"
|
|
name: "Documentation"
|
|
bodyFile: .github/workflows/rel_body.md
|
|
prerelease: true
|
|
replacesArtifacts: false
|
|
allowUpdates: false
|
|
tag: docs
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|