Skip to content

test: updates CI without any modifications #66

test: updates CI without any modifications

test: updates CI without any modifications #66

Workflow file for this run

name: CI
on: ['push', 'pull_request']
jobs:
ci:
name: CI
runs-on: ubuntu-latest
permissions:
contents: write # to upload assets to releases
attestations: write # to upload assets attestation for build provenance
id-token: write # grant additional permission to GITHUB_TOKEN workflow
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Set up PR environment
if: github.event.number != null
run: echo "PULL_REQUEST_ID=${{ github.event.number }}" >> $GITHUB_ENV
- name: Install npm dependencies
run: npm ci
- name: Install pip dependencies
run: pip install -r requirements.txt -r scripts/pdf/requirements.txt
- name: Test
run: npm test
- name: Build
run: bash scripts/build.sh
- name: Build PDF
working-directory: ./scripts/pdf
run: |
bash build-pdf.sh
- name: List files
run: |
ls -la
echo "Next"
ls -la language_archives
echo "Next"
ls -ls scripts/pdf
- name: Check if Zip files exist
id: check-zip
run: |
if [[ $(find language_archives -name "*.zip" | wc -l) -gt 0 ]]; then
echo "::set-output name=exists::true"
else
echo "::set-output name=exists::false"
fi
shell: bash
- name: Attest Zip files
if: steps.check-zip.outputs.exists == 'true'
uses: actions/attest-build-provenance@v1
with:
subject-path: 'language_archives/**/*.zip'
- name: Check if PDF files exist
id: check-pdf
run: |
if [[ $(find scripts/pdf -name "*.pdf" | wc -l) -gt 0 ]]; then
echo "::set-output name=exists::true"
else
echo "::set-output name=exists::false"
fi
shell: bash
- name: Attest PDF files
if: steps.check-pdf.outputs.exists == 'true'
uses: actions/attest-build-provenance@v1
with:
subject-path: 'scripts/pdf/**/*.pdf'
- name: Check if Checksums file exists
id: check-checksums
run: |
if [[ -f "tldr.sha256sums" ]]; then
echo "::set-output name=exists::true"
else
echo "::set-output name=exists::false"
fi
shell: bash
- name: Attest Checksums file
if: steps.check-checksums.outputs.exists == 'true'
uses: actions/attest-build-provenance@v1
with:
subject-path: 'tldr.sha256sums'
- name: Deploy
run: bash scripts/deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}