fix link checker job #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Aliexpress Product Checker | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 9 * * 1 # 9AM every monday | ||
jobs: | ||
check-aliexpress-links: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: node:19 | ||
services: | ||
selenium: | ||
image: selenium/standalone-firefox | ||
options: --shm-size=2gb | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19 | ||
- uses: abhi1693/[email protected] | ||
with: | ||
browser: firefox | ||
version: latest | ||
Install some other selenium dependencies | ||
- run: | | ||
apt-get update -y && | ||
apt-get install --no-install-recommends --no-install-suggests -y tzdata ca-certificates bzip2 curl wget libc-dev libxt6 && | ||
apt-get install --no-install-recommends --no-install-suggests -y `apt-cache depends firefox-esr | awk '/Depends:/{print$2}'` && | ||
update-ca-certificates && | ||
# Cleanup unnecessary stuff | ||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && | ||
rm -rf /var/lib/apt/lists/* /tmp/* | ||
- run: | | ||
wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz && | ||
tar -zxf geckodriver-v0.31.0-linux64.tar.gz -C /usr/local/bin && | ||
chmod +x /usr/local/bin/geckodriver && | ||
rm geckodriver-v0.31.0-linux64.tar.gz | ||
- run: npm i selenium-webdriver | ||
- run: npx node .github/workflows/test-ali-links.mjs |