Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload docs to releases.slint.dev in www-releases GH repo #4995

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/nightly_snapshot.yaml
Original file line number Diff line number Diff line change
@@ -332,11 +332,11 @@ jobs:
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
ssh-agent sh -c 'echo "${{ secrets.WWW_PUBLISH_SSH_KEY }}" | ssh-add - && git clone git@github.com:slint-ui/www.git --depth 1'
ssh-agent sh -c 'echo "${{ secrets.WWW_PUBLISH_SSH_KEY }}" | ssh-add - && git clone git@github.com:slint-ui/www-releases.git --depth 1'
cd www

if [[ "${{ github.event.inputs.release }}" == "true" ]]; then
output_path="releases/${{ steps.version.outputs.VERSION }}"
output_path="${{ steps.version.outputs.VERSION }}"
else
output_path="snapshots/${GITHUB_REF##*/}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that this will now create the snapshots in the www-release repo. Is that intentional?

fi
@@ -368,7 +368,7 @@ jobs:
cp -a ../target/doc/* $output_path/docs/rust/

# Fix up link to Slint language documentation
sed -i "s!https://slint.dev/releases/.*/docs/!../../!" $output_path/docs/rust/slint/*.html
sed -i "s!https://releases.slint.dev/.*/docs/!../../!" $output_path/docs/rust/slint/*.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link are still using slint.dev in the docs, so either leave it as it was before, or repleace all other occurrences in the repo


for lang in rust cpp node; do
mkdir -p $output_path/docs/tutorial/$lang
@@ -382,16 +382,16 @@ jobs:
- name: Adjust redirections
if: github.event.inputs.release == 'true'
run: |
sed -i "/1.0.2/! s,releases/[0-9]*\.[0-9]*\.[0-9]*/\(.*\),releases/${{ steps.version.outputs.VERSION }}/\1," www/data/_redirects
sed -i "/1.0.2/! s,[0-9]*\.[0-9]*\.[0-9]*/\(.*\),${{ steps.version.outputs.VERSION }}/\1," www-releases/_redirects

- name: Adjust slintpad default tag
if: github.event.inputs.release == 'true'
run: sed -i "s,XXXX_DEFAULT_TAG_XXXX,v${{ steps.version.outputs.VERSION }}," www/releases/${{ steps.version.outputs.VERSION }}/editor/assets/*.js
run: sed -i "s,XXXX_DEFAULT_TAG_XXXX,v${{ steps.version.outputs.VERSION }}," www-releases/${{ steps.version.outputs.VERSION }}/editor/assets/*.js

- name: Update versions.txt
if: github.event.inputs.release == 'true'
run: ls -1 | grep -v versions.txt | sort --version-sort -r > versions.txt
working-directory: www/releases
working-directory: www-releases

- name: commit and push
run: |
Loading