Skip to content

Update other.xml

Update other.xml #19

Workflow file for this run

name: deploy
on:
push:
branches: [main]
jobs:
generate:
name: Generate XML files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Clear output directory
run: |
rm -rf output/*
- name: Generate materials xml files
run: |
python3 materials.py
- name: Add legacy files
run: |
mv legacy/ output/
- name: Add version header
run: |
# Since '!'' is a special characters it's a bit messy
export VERSION=$(cat version | grep -v -e ^# -e ^$)
echo -e "<\!-- ##VERSION REST materials "$VERSION"## -->\n\n" >> /tmp/test
sed -i 's/<\\!--/<!--/' /tmp/test
cat output/rest.xml >> /tmp/test
mv /tmp/test output/rest.xml
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: output/
deploy: # https://github.com/actions/deploy-pages
name: GitHub Pages deployment
runs-on: ubuntu-latest
needs: generate
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1