diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..cedacbd --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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" diff --git a/api/file-types.mdx b/api/file-types.mdx index 19762a9..04a29df 100644 --- a/api/file-types.mdx +++ b/api/file-types.mdx @@ -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! diff --git a/babel.config.js b/babel.config.js index e00595d..bfd75db 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: [require.resolve('@docusaurus/core/lib/babel/preset')], + presets: [require.resolve("@docusaurus/core/lib/babel/preset")], }; diff --git a/src/components/Stats/index.tsx b/src/components/Stats/index.tsx index 5ff4170..48feb0e 100644 --- a/src/components/Stats/index.tsx +++ b/src/components/Stats/index.tsx @@ -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()