Skip to content

Commit

Permalink
Automate crawler, remove stat caching, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
DervexDev committed May 5, 2024
1 parent d1ac57f commit 96232e5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 7 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy and Crawl

on:
push:
branches:
- main

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
CRAWLER_USER_ID: ${{ secrets.CRAWLER_USER_ID }}
CRAWLER_API_KEY: ${{ secrets.CRAWLER_API_KEY }}
CRAWLER_ID: ${{ secrets.CRAWLER_ID }}

jobs:
deploy:
name: Deploy to Vercel
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Vercel
run: npm install --global vercel@latest

- name: Pull Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

crawl:
name: Run Algolia Crawler
runs-on: ubuntu-latest
needs: deploy

steps:
- name: Reindex
run: |
curl -H "Content-Type: application/json" -X POST --user ${CRAWLER_USER_ID}:${CRAWLER_API_KEY} "https://crawler.algolia.com/api/1/crawlers/${CRAWLER_ID}/reindex"
6 changes: 3 additions & 3 deletions api/file-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ Any directory on the filesystem will turn into a `Folder` instance with the same
Files with `lua` or `luau` extensions are transformed into the corresponding Roblox script instances:
- Any file ending in `.server.lua(a)` will turn into a `Script` instance
- Any file ending in `.client.lua(a)` will turn into a `LocalScript` instance
- Any other `.lua(a)` file will turn into a `ModuleScript` instance
- Any file ending in `.server.lua(u)` will turn into a `Script` instance
- Any file ending in `.client.lua(u)` will turn into a `LocalScript` instance
- Any other `.lua(u)` file will turn into a `ModuleScript` instance
:::tip
You can disable scripts by adding `--disable` comment at the very beginning of the script source without needing to create special [Data File](#data-file) only for this property!
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
4 changes: 1 addition & 3 deletions src/components/Stats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ export default function Stats(): JSX.Element {
);

useEffect(() => {
fetch(`https://api.argon.wiki/pull`, {
cache: "force-cache",
})
fetch(`https://api.argon.wiki/pull`)
.then((response) => {
response
.json()
Expand Down

0 comments on commit 96232e5

Please sign in to comment.