forked from 1b-agent/opencadstudio-upstream
Fix website checkout and snap build context
Co-authored-by: dichhead <330471626+dichhead@users.noreply.github.com>
This commit is contained in:
1 parent
9e284c7e61
commit
05dda2eb29
2 files changed
+13
-8
No files matched your search
@@ -99,12 +99,12 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
path: website
|
path: website-source
|
||||||
|
|
||||||
- name: Validate website
|
- name: Validate website
|
||||||
run: |
|
run: |
|
||||||
SCRIPT=$(cat <<'EOF'
|
SCRIPT=$(cat <<'EOF'
|
||||||
cd "$GITHUB_WORKSPACE/website"
|
cd "$GITHUB_WORKSPACE/website-source"
|
||||||
python3 scripts/test_site.py
|
python3 scripts/test_site.py
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
@@ -113,8 +113,8 @@ jobs:
|
|||||||
- name: Assemble landing page
|
- name: Assemble landing page
|
||||||
run: |
|
run: |
|
||||||
SCRIPT=$(cat <<'EOF'
|
SCRIPT=$(cat <<'EOF'
|
||||||
cd "$GITHUB_WORKSPACE/website"
|
cd "$GITHUB_WORKSPACE/website-source"
|
||||||
sh "$GITHUB_WORKSPACE/website/scripts/assemble-site.sh" "$GITHUB_WORKSPACE/dist"
|
sh "$GITHUB_WORKSPACE/website-source/scripts/assemble-site.sh" "$GITHUB_WORKSPACE/dist"
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
nix develop --command bash --noprofile --norc -euo pipefail -c "$SCRIPT"
|
nix develop --command bash --noprofile --norc -euo pipefail -c "$SCRIPT"
|
||||||
@@ -122,7 +122,7 @@ jobs:
|
|||||||
- name: Record website source
|
- name: Record website source
|
||||||
run: |
|
run: |
|
||||||
SCRIPT=$(cat <<'EOF'
|
SCRIPT=$(cat <<'EOF'
|
||||||
cd "$GITHUB_WORKSPACE/website"
|
cd "$GITHUB_WORKSPACE/website-source"
|
||||||
git rev-parse HEAD > "$GITHUB_WORKSPACE/dist/site-version.txt"
|
git rev-parse HEAD > "$GITHUB_WORKSPACE/dist/site-version.txt"
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
@@ -270,7 +270,7 @@ jobs:
|
|||||||
- name: Generate project growth charts
|
- name: Generate project growth charts
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.OCS_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.OCS_GITHUB_TOKEN }}
|
||||||
run: nix develop --command python3 website/scripts/generate-star-history.py --output-dir dist
|
run: nix develop --command python3 website-source/scripts/generate-star-history.py --output-dir dist
|
||||||
|
|
||||||
# Browsers cannot reliably fetch YouTube playlist/oEmbed responses because
|
# Browsers cannot reliably fetch YouTube playlist/oEmbed responses because
|
||||||
# of CORS. Build a same-origin listing and thumbnail directory for the
|
# of CORS. Build a same-origin listing and thumbnail directory for the
|
||||||
|
|||||||
@@ -163,8 +163,13 @@ jobs:
|
|||||||
test -n "$VERSION"
|
test -n "$VERSION"
|
||||||
rm -rf .snap-build
|
rm -rf .snap-build
|
||||||
mkdir -p .snap-build
|
mkdir -p .snap-build
|
||||||
cp linux-payload.tar.gz .snap-build/
|
shopt -s dotglob
|
||||||
cp -R snap .snap-build/
|
for entry in * .*; do
|
||||||
|
case "$entry" in
|
||||||
|
.|..|.git|.snap-build) continue ;;
|
||||||
|
esac
|
||||||
|
cp -a "$entry" .snap-build/
|
||||||
|
done
|
||||||
sed -i "s/^version: .*/version: '$VERSION'/" .snap-build/snap/snapcraft.yaml
|
sed -i "s/^version: .*/version: '$VERSION'/" .snap-build/snap/snapcraft.yaml
|
||||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in new issue
Block a user